diff options
author | Andrew Brestick <brestick@mcs.anl.gov> | 2008-07-16 21:12:33 +0000 |
---|---|---|
committer | Andrew Brestick <brestick@mcs.anl.gov> | 2008-07-16 21:12:33 +0000 |
commit | bcd79f403978566ca14437d86865265cca683c15 (patch) | |
tree | 83f37114a51ee2cf14804f3fbe9e95d01b37b8d5 /src/lib/Server/Plugins/Metadata.py | |
parent | 7fcf8c561ddb3910c85f49d9b5803cf0a131af4c (diff) | |
download | bcfg2-bcd79f403978566ca14437d86865265cca683c15.tar.gz bcfg2-bcd79f403978566ca14437d86865265cca683c15.tar.bz2 bcfg2-bcd79f403978566ca14437d86865265cca683c15.zip |
various fixes to bb plugin
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4799 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Metadata.py')
-rw-r--r-- | src/lib/Server/Plugins/Metadata.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py index 75b80459f..75fca6450 100644 --- a/src/lib/Server/Plugins/Metadata.py +++ b/src/lib/Server/Plugins/Metadata.py @@ -85,13 +85,15 @@ class Metadata(Bcfg2.Server.Plugin.MetadataPlugin, def __init__(self, core, datastore, watch_clients=True): Bcfg2.Server.Plugin.Plugin.__init__(self, core, datastore) #self.__name__ = 'Metadata' - try: - core.fam.AddMonitor("%s/%s" % (self.data, "groups.xml"), self) - if watch_clients: + if watch_clients: + try: + core.fam.AddMonitor("%s/%s" % (self.data, "groups.xml"), self) core.fam.AddMonitor("%s/%s" % (self.data, "clients.xml"), self) - except: - raise Bcfg2.Server.Plugin.PluginInitError - self.states = {'groups.xml':False, 'clients.xml':False} + except: + raise Bcfg2.Server.Plugin.PluginInitError + self.states = {} + if watch_clients: + self.states = {"groups.xml":False, "clients.xml":False} self.addresses = {} self.clients = {} self.aliases = {} |