Skip to content

Commit

Permalink
check attr exists first
Browse files Browse the repository at this point in the history
  • Loading branch information
willcl-ark committed Sep 8, 2024
1 parent c325aec commit b7a1980
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/scenarios/commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def parse_args(self):
help_parser = argparse.ArgumentParser(usage="%(prog)s [options]")
self.add_options(help_parser)
help_args, _ = help_parser.parse_known_args()
if help_args.help:
# Check if 'help' attribute exists in help_args before accessing it
if hasattr(help_args, "help") and help_args.help:
help_parser.print_help()
sys.exit(0)

Expand Down

0 comments on commit b7a1980

Please sign in to comment.