Skip to content

Commit a9f0447

Browse files
committed
Minor bug fix.
Previous will give 'Invalid action' message if user doesn't provide the --action option
1 parent c70fcca commit a9f0447

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

about_code_tool/genabout.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -747,11 +747,12 @@ def main(parser, options, args):
747747
handler.setLevel(logging.WARNING)
748748

749749
valid_actions = 0, 1, 2, 3
750-
if action and action in valid_actions:
751-
action_num = action
752-
else:
753-
print('Invalid action: should be 0,1,2 or 3')
754-
sys.exit(errno.EINVAL)
750+
if action:
751+
if action in valid_actions:
752+
action_num = action
753+
else:
754+
print('Invalid action: should be 0, 1, 2 or 3')
755+
sys.exit(errno.EINVAL)
755756

756757
if copy_files_path and not _exists(copy_files_path):
757758
print("The project path does not exist.")

0 commit comments

Comments
 (0)