Skip to content

Commit

Permalink
status subcommand fails with verification.sh test.
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Fujita <[email protected]>
  • Loading branch information
fujitatomoya committed Aug 8, 2024
1 parent 7ac52b7 commit 187f459
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions ros2ai/verb/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ def main(self, *, args):
# try to call OpenAI API with user configured setting
is_valid = openai_config.is_api_key_valid()

if is_valid and args.verbose:
print("[SUCCESS] Valid OpenAI API key.")
if is_valid:
if args.verbose:
print("[SUCCESS] Valid OpenAI API key.")
else:
print("[FAILURE] Invalid OpenAI API key.")
return 1
Expand All @@ -58,8 +59,9 @@ def main(self, *, args):
headers
)

if can_get_models and args.verbose:
print("[SUCCESS] Retrieved list of models.")
if can_get_models:
if args.verbose:
print("[SUCCESS] Retrieved list of models.")
else:
print("[FAILURE] Could not retrieved list of models.")
return 1
Expand Down
2 changes: 1 addition & 1 deletion scripts/verification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function verify_ros2ai() {
echo "[${FUNCNAME[0]}]: verifying ros2ai."
# execute all commands in the list
for command in "${command_list[@]}"; do
#echo "----- $command"
echo "----- $command"
eval $command
done
echo "----- all ros2ai commands return successfully!!! -----"
Expand Down

0 comments on commit 187f459

Please sign in to comment.