From cb884f3c9171d732d875642e32c11ad4ec13f7d1 Mon Sep 17 00:00:00 2001 From: Michael Fenn Date: Sat, 7 Dec 2013 00:51:57 -0500 Subject: Options: Finalize once If finalize is called early, then some options will not be parsed but instead always take the default value (observed with reporting.transport). Calling finalize once at the end of the processing lets all options take the values they were assigned in the config file. --- src/lib/Bcfg2/Options/Parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/Bcfg2/Options/Parser.py') diff --git a/src/lib/Bcfg2/Options/Parser.py b/src/lib/Bcfg2/Options/Parser.py index 80f966246..307b767d8 100644 --- a/src/lib/Bcfg2/Options/Parser.py +++ b/src/lib/Bcfg2/Options/Parser.py @@ -246,8 +246,8 @@ class Parser(argparse.ArgumentParser): self._set_defaults() self.parse_known_args(args=self.argv, namespace=self.namespace) self._parse_config_options() - self._finalize() self._parse_config_options() + self._finalize() # phase 4: fix up macros repo = getattr(self.namespace, "repository", repository.default) -- cgit v1.2.3-1-g7c22