diff options
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Properties.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Properties.py b/src/lib/Bcfg2/Server/Plugins/Properties.py index 5b48a2b8f..1b925ce46 100644 --- a/src/lib/Bcfg2/Server/Plugins/Properties.py +++ b/src/lib/Bcfg2/Server/Plugins/Properties.py @@ -125,12 +125,15 @@ class Properties(Bcfg2.Server.Plugin.Plugin, SETUP = core.setup def get_additional_data(self, metadata): - automatch = self.core.setup.cfp.getboolean("properties", "automatch", - default=False) + if self.core.setup.cfp.getboolean("properties", "automatch", + default=False): + default_automatch = "true" + else: + default_automatch = "false" rv = dict() for fname, pfile in self.store.entries.items(): - if (automatch or - pfile.xdata.get("automatch", "false").lower() == "true"): + if pfile.xdata.get("automatch", + default_automatch).lower() == "true": rv[fname] = pfile.XMLMatch(metadata) else: rv[fname] = copy.copy(pfile) |