-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix getopt deprecation warnings (part 1) #4908
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a small error in banner.py
but can be merged after the fix
|
||
instance_name = 'pki-tomcat' | ||
if args.help: | ||
self.print_help() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method print_help()
is not defined in the BannerShowCLI.
The argparse has its way to print the help message, we could use it making easier to keep option and description aligned but not sure how to configure with these modular commands. Can be investigated in separate PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I've renamed usage()
to print_help()
.
For now I just want to fix the deprecation warnings, but later we can try to use sub-parsers to define the options & help messages for the sub-commands.
if o in ('-i', '--instance'): | ||
instance_name = a | ||
if args.help: | ||
self.print_help() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
Quality Gate passedIssues Measures |
@fmarco76 Thanks! |
The following Python modules have been updated to use
argparse
: