summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-12-21 14:52:36 -0500
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-12-21 14:52:36 -0500
commitbd4e7494f7ae8da5bd9af8be688f147796c8a37f (patch)
treee2d8c5f7ac2763267ba9ef4509cee80fca0f4f60 /src/lib/Server/Plugins
parentc07c1ad344e5d2939ffa4351fb0ce26e80339088 (diff)
downloadbcfg2-bd4e7494f7ae8da5bd9af8be688f147796c8a37f.tar.gz
bcfg2-bd4e7494f7ae8da5bd9af8be688f147796c8a37f.tar.bz2
bcfg2-bd4e7494f7ae8da5bd9af8be688f147796c8a37f.zip
fixed logic for file creation; only write info.xml if none exists
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/FileProbes.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/FileProbes.py b/src/lib/Server/Plugins/FileProbes.py
index 95e8c7a00..1ee3d0644 100644
--- a/src/lib/Server/Plugins/FileProbes.py
+++ b/src/lib/Server/Plugins/FileProbes.py
@@ -129,9 +129,8 @@ class FileProbes(Bcfg2.Server.Plugin.Plugin,
create = False
try:
cfg.entries[filename].bind_entry(entry, metadata)
- create = True
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