summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-06-22 20:17:45 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-06-22 20:17:45 +0000
commitc9c10731636166179fbd22b827edc0e55eede2b8 (patch)
treefc044c12c241e509136ce160f4fbeee06cb63431 /src
parent6e2e453831354dbdc82a0ac2bc9f377f13163718 (diff)
downloadbcfg2-c9c10731636166179fbd22b827edc0e55eede2b8.tar.gz
bcfg2-c9c10731636166179fbd22b827edc0e55eede2b8.tar.bz2
bcfg2-c9c10731636166179fbd22b827edc0e55eede2b8.zip
check for undefined image
(Logical change 1.236) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@988 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Metadata.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Server/Metadata.py b/src/lib/Server/Metadata.py
index 814728025..177735264 100644
--- a/src/lib/Server/Metadata.py
+++ b/src/lib/Server/Metadata.py
@@ -104,6 +104,9 @@ class MetadataStore(SingleXMLFileBacked):
prof = self.profiles[profile]
# should we uniq here? V
bundles = reduce(lambda x, y:x + y, [self.classes.get(cls) for cls in prof.classes])
+ if not self.images.has_key(image):
+ syslog(LOG_ERR, "Metadata: Image %s not defined" % image)
+ raise MetadataConsistencyError
toolset = self.images[image]
return Metadata(False, image, prof.classes, bundles, prof.attributes, client, toolset)