Skip to content

Commit

Permalink
Merge pull request #552 from willcl-ark/commander-attr
Browse files Browse the repository at this point in the history
check attr exists first in Commander help
  • Loading branch information
pinheadmz authored Sep 8, 2024
2 parents 2e177a7 + b7a1980 commit af58611
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 af58611

Please sign in to comment.