diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Client/Tools/POSIX.py | 2 | ||||
-rw-r--r-- | src/lib/Server/Plugin.py | 3 | ||||
-rw-r--r-- | src/lib/Server/Plugins/FileProbes.py | 12 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/Client/Tools/POSIX.py b/src/lib/Client/Tools/POSIX.py index bb6143f14..3591c33ad 100644 --- a/src/lib/Client/Tools/POSIX.py +++ b/src/lib/Client/Tools/POSIX.py @@ -807,7 +807,7 @@ class POSIX(Bcfg2.Client.Tools.Tool): (entry.tag, entry.get('name'))) entry.set('qtext', nqtext) return False - if group != pstat.st_gid: + if group != pstat.st_gid: # group mismatch for path entry.set('current_group', str(pstat.st_gid)) self.logger.debug("%s %s group wrong" % \ diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py index 190a205e6..3dc1cab38 100644 --- a/src/lib/Server/Plugin.py +++ b/src/lib/Server/Plugin.py @@ -817,7 +817,8 @@ class PrioDir(Plugin, Generator, XMLDirectoryBacked): def get_attrs(self, entry, metadata): """ get a list of attributes to add to the entry during the bind """ for src in list(self.entries.values()): - if src.Cache(metadata) == False: + cached = src.Cache(metadata) + if cached == False: self.logger.error("Called before data loaded") raise PluginExecutionError matching = [src for src in list(self.entries.values()) diff --git a/src/lib/Server/Plugins/FileProbes.py b/src/lib/Server/Plugins/FileProbes.py index 2d64c3343..1ee3d0644 100644 --- a/src/lib/Server/Plugins/FileProbes.py +++ b/src/lib/Server/Plugins/FileProbes.py @@ -128,10 +128,9 @@ class FileProbes(Bcfg2.Server.Plugin.Plugin, create = False try: - cfg.entries[filenames].bind_entry(entry, metadata) - create = True + cfg.entries[filename].bind_entry(entry, metadata) except Bcfg2.Server.Plugin.PluginExecutionError: - pass + create = True if create: self.logger.info("Writing new probed file %s" % fileloc) @@ -146,7 +145,8 @@ class FileProbes(Bcfg2.Server.Plugin.Plugin, infoxml = os.path.join("%s%s" % (cfg.data, filename), "info.xml") - self.write_infoxml(infoxml, entry, data) + if not os.path.exists(infoxml): + self.write_infoxml(infoxml, entry, data) # Service the FAM events queued up by the key generation # so the data structure entries will be available for @@ -165,7 +165,7 @@ class FileProbes(Bcfg2.Server.Plugin.Plugin, raise Bcfg2.Server.Plugin.PluginExecutionError self.core.fam.handle_events_in_interval(1) try: - cfg.entries[filenames].bind_entry(entry, metadata) + cfg.entries[filename].bind_entry(entry, metadata) is_bound = True except Bcfg2.Server.Plugin.PluginExecutionError: pass @@ -186,7 +186,7 @@ class FileProbes(Bcfg2.Server.Plugin.Plugin, self.logger.error("%s still not registered" % filename) raise Bcfg2.Server.Plugin.PluginExecutionError self.core.fam.handle_events_in_interval(1) - cfg.entries[filenames].bind_entry(entry, metadata) + cfg.entries[filename].bind_entry(entry, metadata) if entry.text == contents: updated = True tries += 1 |