diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2008-05-22 19:05:37 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2008-05-22 19:05:37 +0000 |
commit | 471b5bf0d417a2847d40aee33652ca6d22dd964d (patch) | |
tree | 3049d0d31772a6876f187f749ea67255f824aa2b /src/lib/Server/Core.py | |
parent | c44b5dec67211bcf1c9dba11f049941754d8b18c (diff) | |
download | bcfg2-471b5bf0d417a2847d40aee33652ca6d22dd964d.tar.gz bcfg2-471b5bf0d417a2847d40aee33652ca6d22dd964d.tar.bz2 bcfg2-471b5bf0d417a2847d40aee33652ca6d22dd964d.zip |
Fix bcfg2-info failure if no repo has been created (Resolves Ticket #556)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4622 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Core.py')
-rw-r--r-- | src/lib/Server/Core.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Server/Core.py b/src/lib/Server/Core.py index 6bdf2c930..6a6264e9a 100644 --- a/src/lib/Server/Core.py +++ b/src/lib/Server/Core.py @@ -241,7 +241,10 @@ class Core(object): except: logger.error("Unexpected instantiation failure for plugin %s" % (plugin), exc_info=1) - self.metadata = self.plugins['Metadata'] + if 'Metadata' in self.plugins: + self.metadata = self.plugins['Metadata'] + else: + raise CoreInitError, "No Metadata plugin loaded" for plugin in structures: if self.plugins.has_key(plugin): self.structures.append(self.plugins[plugin]) |