Skip to content

Instantly share code, notes, and snippets.

@solj
Created March 12, 2014 17:57
Show Gist options
  • Save solj/9512464 to your computer and use it in GitHub Desktop.
Save solj/9512464 to your computer and use it in GitHub Desktop.
diff --git a/src/lib/Bcfg2/Server/Plugins/Properties.py b/src/lib/Bcfg2/Server/Plugins/Properties.py
index 8c6cf79..a3d6c08 100644
--- a/src/lib/Bcfg2/Server/Plugins/Properties.py
+++ b/src/lib/Bcfg2/Server/Plugins/Properties.py
@@ -328,7 +328,8 @@ class Properties(Bcfg2.Server.Plugin.Plugin,
def get_additional_data(self, metadata):
rv = dict()
for fname, pfile in self.entries.items():
- rv[fname] = pfile.get_additional_data(metadata)
+ if os.path.isfile(fname) and os.path.getsize(fname) > 0:
+ rv[fname] = pfile.get_additional_data(metadata)
return rv
get_additional_data.__doc__ = \
Bcfg2.Server.Plugin.Connector.get_additional_data.__doc__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment