summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Core.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2004-10-19 20:30:03 +0000
committerNarayan Desai <desai@mcs.anl.gov>2004-10-19 20:30:03 +0000
commit14f9ef1c442fdf8c03df85186a8825cae35ac99f (patch)
treece7ad4b63af9fa4cfebc2e9a270dbb7c2484d8ec /src/lib/Server/Core.py
parent2054337d731680481e366d0b206d4c17c4cd9267 (diff)
downloadbcfg2-14f9ef1c442fdf8c03df85186a8825cae35ac99f.tar.gz
bcfg2-14f9ef1c442fdf8c03df85186a8825cae35ac99f.tar.bz2
bcfg2-14f9ef1c442fdf8c03df85186a8825cae35ac99f.zip
fix startup failure
(Logical change 1.103) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@472 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Core.py')
-rw-r--r--src/lib/Server/Core.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py
index 30f22a902..b3414832b 100644
--- a/src/lib/Server/Core.py
+++ b/src/lib/Server/Core.py
@@ -65,14 +65,22 @@ class Core(object):
self.structures = []
self.cron = {}
for structure in structures:
- mod = getattr(__import__("Bcfg2.Server.Structures.%s" %
- (structure)).Server.Structures, structure)
+ try:
+ mod = getattr(__import__("Bcfg2.Server.Structures.%s" %
+ (structure)).Server.Structures, structure)
+ except ImportError:
+ syslog(LOG_ERR, "Failed to load structure %s" % (structure))
+ continue
struct = getattr(mod, structure)
self.structures.append(struct(self, self.datastore))
self.generators = []
for generator in generators:
- mod = getattr(__import__("Bcfg2.Server.Generators.%s" %
- (generator)).Server.Generators, generator)
+ try:
+ mod = getattr(__import__("Bcfg2.Server.Generators.%s" %
+ (generator)).Server.Generators, generator)
+ except ImportError:
+ syslog(LOG_ERR, 'Failed to load generator %s' % (generator))
+ continue
gen = getattr(mod, generator)
self.generators.append(gen(self, self.datastore))
# we need to inventory and setup generators