summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-08-04 18:42:19 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-08-04 18:42:19 +0000
commit527a7b561b9e38933f30869fca0bf46e4af979d4 (patch)
tree57990b6267c6d71ac1c8fbdd942d712a8d7d54d7
parenta88d256f0e40bfb118b98882c66bf789d8fbfcf6 (diff)
downloadbcfg2-527a7b561b9e38933f30869fca0bf46e4af979d4.tar.gz
bcfg2-527a7b561b9e38933f30869fca0bf46e4af979d4.tar.bz2
bcfg2-527a7b561b9e38933f30869fca0bf46e4af979d4.zip
Fix empty plugin list core tb
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4849 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Core.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index de2e1a0ba..92602808d 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -230,10 +230,13 @@ class Core(object):
chk_plugins = self.plugins.values()
while True:
- plugin = chk_plugins.pop()
- if isinstance(plugin, Bcfg2.Server.Plugin.MetadataPlugin):
- self.metadata = plugin
- break
+ try:
+ plugin = chk_plugins.pop()
+ if isinstance(plugin, Bcfg2.Server.Plugin.MetadataPlugin):
+ self.metadata = plugin
+ break
+ except:
+ pass
if not chk_plugins:
self.init_plugins("Metadata")
self.metadata = self.plugins["Metadata"]
@@ -241,10 +244,13 @@ class Core(object):
chk_plugins = self.plugins.values()
while True:
- plugin = chk_plugins.pop()
- if isinstance(plugin, Bcfg2.Server.Plugin.StatisticsPlugin):
- self.stats = plugin
- break
+ try:
+ plugin = chk_plugins.pop()
+ if isinstance(plugin, Bcfg2.Server.Plugin.StatisticsPlugin):
+ self.stats = plugin
+ break
+ except:
+ pass
if not chk_plugins:
self.init_plugins("Statistics")
self.stats = self.plugins["Statistics"]