diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-09 11:19:47 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-09 11:46:16 -0400 |
commit | 6fedc7a28b21cab6be173ab8ef82113697ab170b (patch) | |
tree | 7b1515bec5f9ea2c1f8546ad7ecb685f9ba2a2d5 /src/lib/Bcfg2/Options/Parser.py | |
parent | 86ebb3260c9e1bc77d2f69257576bcbabeba4097 (diff) | |
download | bcfg2-6fedc7a28b21cab6be173ab8ef82113697ab170b.tar.gz bcfg2-6fedc7a28b21cab6be173ab8ef82113697ab170b.tar.bz2 bcfg2-6fedc7a28b21cab6be173ab8ef82113697ab170b.zip |
Options: fix parsing of ComponentActions and other finalizable actions
Diffstat (limited to 'src/lib/Bcfg2/Options/Parser.py')
-rw-r--r-- | src/lib/Bcfg2/Options/Parser.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Options/Parser.py b/src/lib/Bcfg2/Options/Parser.py index 6414cf98e..b956ca089 100644 --- a/src/lib/Bcfg2/Options/Parser.py +++ b/src/lib/Bcfg2/Options/Parser.py @@ -138,26 +138,26 @@ class Parser(argparse.ArgumentParser): def _finalize(self): for opt in self.option_list[:]: - opt.finalize() + opt.finalize(self.namespace) def _reset_namespace(self): self.parsed = False for attr in dir(self.namespace): if (not attr.startswith("_") and attr not in ['uri', 'version', 'name'] and - attr not in self.config_files): + attr not in self._config_files): delattr(self.namespace, attr) def add_config_file(self, dest, cfile): """ Add a config file, which triggers a full reparse of all options. """ - if dest not in self.config_files: + if dest not in self._config_files: self._reset_namespace() self._cfp.read([cfile]) self._defaults_set = [] self._set_defaults() self._parse_config_options() - self.config_files.append(dest) + self._config_files.append(dest) def reparse(self, argv=None): """ Reparse options after they have already been parsed. |