Skip to content

Commit

Permalink
Merge pull request Significant-Gravitas#542 from ccheney/attr-error-l…
Browse files Browse the repository at this point in the history
…ower

command_name null check before calling .lower()
  • Loading branch information
richbeales authored Apr 12, 2023
2 parents a0cebb0 + 3ffff9f commit 4dbf721
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def parse_arguments():
f"COMMAND = {Fore.CYAN}{command_name}{Style.RESET_ALL} ARGUMENTS = {Fore.CYAN}{arguments}{Style.RESET_ALL}")

# Execute command
if command_name.lower().startswith( "error" ):
if command_name is not None and command_name.lower().startswith( "error" ):
result = f"Command {command_name} threw the following error: " + arguments
elif command_name == "human_feedback":
result = f"Human feedback: {user_input}"
Expand Down

0 comments on commit 4dbf721

Please sign in to comment.