From 44d7ac2dce2691116da0ba4fa88d37d7fde89134 Mon Sep 17 00:00:00 2001 From: Peter Eckersley Date: Fri, 28 Aug 2015 17:31:57 -0700 Subject: [PATCH] Plumbing for tweaked args - to make "run" the default, we need to add it to the args - which means we need to pass that back up to the actual argparse call (This is ugly... probably HelpfulArgParser needs to actuall inherit from argparse...) --- letsencrypt/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 1fd04ccbd..9dacf32c6 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -553,7 +553,7 @@ def create_parser(plugins, args): _create_subparsers(helpful) - return helpful.parser + return helpful.parser, helpful.args # For now unfortunately this constant just needs to match the code below; # there isn't an elegant way to autogenerate it in time. @@ -743,7 +743,8 @@ def main(cli_args=sys.argv[1:]): # note: arg parser internally handles --help (and exits afterwards) plugins = plugins_disco.PluginsRegistry.find_all() - args = create_parser(plugins, cli_args).parse_args(cli_args) + parser,tweaked_cli_args = create_parser(plugins, cli_args) + args = parser.parse_args(tweaked_cli_args) config = configuration.NamespaceConfig(args) # Setup logging ASAP, otherwise "No handlers could be found for