diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Properties.py | 11 | ||||
-rwxr-xr-x | src/sbin/bcfg2-info | 6 |
2 files changed, 10 insertions, 7 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) diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index 4725e05a3..95a18b608 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -445,9 +445,9 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.BaseCore): pname, client = alist try: - automatch = self.core.setup.cfp.getboolean("properties", - "automatch", - default=False) + automatch = self.setup.cfp.getboolean("properties", + "automatch", + default=False) pfile = self.plugins['Properties'].store.entries[pname] if (not force and |