Skip to content

vmupdate/agent/source/args: validate loglevel with argparse - #224

Open
tabs-are-better-than-spaces wants to merge 1 commit into
QubesOS:mainfrom
tabs-are-better-than-spaces:argparse-loglevel
Open

tabs-are-better-than-spaces wants to merge 1 commit into
QubesOS:mainfrom
tabs-are-better-than-spaces:argparse-loglevel

Conversation

@tabs-are-better-than-spaces

Copy link
Copy Markdown

This PR uses argparse to validate userinput according to the current help documentation to avoid showing an exception if an invalid log level is supplied.

However, due to this change valid log level aliases (e.g. FATAL with loglevel 50 would show the same logs as CRITICAL) from python will not be accepted. If desired I can include FATAL, WARN, NOTSET to preserve the current functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant