-
Notifications
You must be signed in to change notification settings - Fork 49
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: add manage-sources-list-d CLI option (LP:2077360) ; refactor: optparse to argparse for CLI options #265
Conversation
…or landscape-client
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.
Overall looks good; a couple inline asks
"--include-manager-plugins", | ||
metavar="PLUGINS", | ||
default="", | ||
help="A comma-separated list of manager plugins " | ||
"to enable in addition to the defaults.", | ||
) | ||
parser.add_option( | ||
parser.add_argument( |
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.
What's the anticipated usage here? Something like --manage-sources-list-d false
?
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.
Yep, so a user can do
--manage-sources-list-d false
--manage-sources-list-d true
--manage-sources-list-d
the last one will also set it to true
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
Refactor optparse to argparse. Should be mostly a drop-in replacement except for positional arguments (which were previously ignored).
https://bugs.launchpad.net/landscape-client/+bug/2077360
To create similar functionality for
--manage-sources-list-d
as described in the report, landscape-config will parse the terminal command with an optional argument for t/f values.