summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Properties.py
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2011-01-28 13:11:03 -0600
committerSol Jerome <sol.jerome@gmail.com>2011-01-28 13:11:03 -0600
commit27a4fb9b2ffcd635aa5c7cf9ce454e1a943c1a96 (patch)
treecfcc6c8b706cf7fa22d1686f5fc9668edee25ee8 /src/lib/Server/Plugins/Properties.py
parentdd58837acd6240d20d00af9ff89f768cbece0164 (diff)
downloadbcfg2-27a4fb9b2ffcd635aa5c7cf9ce454e1a943c1a96.tar.gz
bcfg2-27a4fb9b2ffcd635aa5c7cf9ce454e1a943c1a96.tar.bz2
bcfg2-27a4fb9b2ffcd635aa5c7cf9ce454e1a943c1a96.zip
Properties: Catch exception when missing Properties directory
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib/Server/Plugins/Properties.py')
-rw-r--r--src/lib/Server/Plugins/Properties.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Properties.py b/src/lib/Server/Plugins/Properties.py
index 86330f6a0..2888ef1d1 100644
--- a/src/lib/Server/Plugins/Properties.py
+++ b/src/lib/Server/Plugins/Properties.py
@@ -31,7 +31,12 @@ class Properties(Bcfg2.Server.Plugin.Plugin,
def __init__(self, core, datastore):
Bcfg2.Server.Plugin.Plugin.__init__(self, core, datastore)
Bcfg2.Server.Plugin.Connector.__init__(self)
- self.store = PropDirectoryBacked(self.data, core.fam)
+ try:
+ self.store = PropDirectoryBacked(self.data, core.fam)
+ except OSError, e:
+ Bcfg2.Server.Plugin.logger.error("Error while creating Properties "
+ "store: %s %s" % (e.strerror,e.filename))
+ raise Bcfg2.Server.Plugin.PluginInitError
def get_additional_data(self, _):
return copy.deepcopy(self.store.entries)