Skip to content

Commit

Permalink
updater: make help prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Jun 10, 2024
1 parent 1718936 commit 35a9ae0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vmupdate/vmupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def parse_args(args):
'Attempt to update targeted VMs with known updates available '
'or for which last update check was more than N days ago. '
'(default: %(default)d)',
type=int, default=7, choices=range(0, 366))
type=int, default=7)
update_state.add_argument(
'--update-if-available', action='store_true',
help='Update targeted VMs with known updates available.')
Expand Down Expand Up @@ -145,6 +145,9 @@ def parse_args(args):
AgentArgs.add_arguments(parser)
args = parser.parse_args(args)

if args.update_if_stale < 0:
raise ArgumentError("Wrong value for --update-if-stale")

return args


Expand Down

0 comments on commit 35a9ae0

Please sign in to comment.