From 3d7240b6e7183f7e05bcc0de2a35607727a12814 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 8 Sep 2015 18:11:49 +0200 Subject: Options: Really reparse the argument list of Subcommands We change the parser namespace so contain all the global flags. So we silently erase the parser cache and have to set the parsed flag, so that the Parser does not use our "empty" new namespace as cached result. --- src/lib/Bcfg2/Options/Subcommands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/Bcfg2/Options/Subcommands.py b/src/lib/Bcfg2/Options/Subcommands.py index 8972bde00..a9de738a4 100644 --- a/src/lib/Bcfg2/Options/Subcommands.py +++ b/src/lib/Bcfg2/Options/Subcommands.py @@ -82,6 +82,7 @@ class Subcommand(object): """ if args is not None: self.parser.namespace = copy.copy(master_setup) + self.parser.parsed = False alist = shlex.split(args) try: setup = self.parser.parse(alist) -- cgit v1.2.3-1-g7c22