diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2011-01-28 13:11:03 -0600 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2011-01-28 13:11:03 -0600 |
commit | 27a4fb9b2ffcd635aa5c7cf9ce454e1a943c1a96 (patch) | |
tree | cfcc6c8b706cf7fa22d1686f5fc9668edee25ee8 /src/lib | |
parent | dd58837acd6240d20d00af9ff89f768cbece0164 (diff) | |
download | bcfg2-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')
-rw-r--r-- | src/lib/Server/Plugins/Properties.py | 7 |
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) |