summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2015-09-08 18:11:49 +0200
committerSol Jerome <sol.jerome@gmail.com>2015-10-13 13:11:01 -0500
commit3d7240b6e7183f7e05bcc0de2a35607727a12814 (patch)
tree04603f22b0107c38577e562c80f135a3b8c57633
parent76ab7f6e8a2392a2dbe3d9cf4cf3c7399c6fa3f2 (diff)
downloadbcfg2-3d7240b6e7183f7e05bcc0de2a35607727a12814.tar.gz
bcfg2-3d7240b6e7183f7e05bcc0de2a35607727a12814.tar.bz2
bcfg2-3d7240b6e7183f7e05bcc0de2a35607727a12814.zip
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.
-rw-r--r--src/lib/Bcfg2/Options/Subcommands.py1
1 files changed, 1 insertions, 0 deletions
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)