Tushar Gupta has proposed merging ~tushar5526/lpbuildbot-worker:make-flavor-positional-argument-optional into lpbuildbot-worker:main.
Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~tushar5526/lpbuildbot-worker/+git/lpbuildbot-worker/+merge/478180 -- Your team Launchpad code reviewers is requested to review the proposed merge of ~tushar5526/lpbuildbot-worker:make-flavor-positional-argument-optional into lpbuildbot-worker:main.
diff --git a/create-lp-tests-lxd b/create-lp-tests-lxd index fe4927f..24daa0d 100755 --- a/create-lp-tests-lxd +++ b/create-lp-tests-lxd @@ -308,8 +308,8 @@ def remove_build_container(container): def _validate_flavors(flavor_name): if flavor_name and flavor_name not in FLAVORS.keys(): - error_msg = "Flavor {} is not supported. \ -Please provide one of the supported flavors - {}".format( + error_msg = 'Flavor "{}" is not supported. \ +Please provide one of the supported flavors - {}'.format( flavor_name, ", ".join(FLAVORS.keys()) ) raise argparse.ArgumentTypeError(error_msg) @@ -328,6 +328,8 @@ if __name__ == "__main__": ) parser.add_argument( "flavor", + nargs="?", + default="", type=_validate_flavors, help="Extra flavors to build for a series, \ along with base vanilla series specified before. \
_______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : launchpad-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp