summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2004-08-10 19:44:12 +0000
committerNarayan Desai <desai@mcs.anl.gov>2004-08-10 19:44:12 +0000
commit4e624353f087c11d57d668dab1a7e8a6f9a3eeaf (patch)
tree5069a3763d1cf5f9f65ca6a21a527c4a62e67ca2 /src
parent60ba1717302428c64db9f5851f1dd03fbfa02e6c (diff)
downloadbcfg2-4e624353f087c11d57d668dab1a7e8a6f9a3eeaf.tar.gz
bcfg2-4e624353f087c11d57d668dab1a7e8a6f9a3eeaf.tar.bz2
bcfg2-4e624353f087c11d57d668dab1a7e8a6f9a3eeaf.zip
handle nonexistent bundles properly
(Logical change 1.27) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@139 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/bundler.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bundler.py b/src/bundler.py
index 7337433c9..0326ea7c4 100644
--- a/src/bundler.py
+++ b/src/bundler.py
@@ -2,6 +2,7 @@
# $Id: $
from copy import deepcopy
+from syslog import LOG_ERR, syslog
from GeneratorUtils import XMLFileBacked, DirectoryBacked
from Structure import Structure
@@ -38,7 +39,11 @@ class bundler(Structure):
(system, package, service) = self.GetTransInfo(metadata)
bundleset = []
for bundlename in metadata.bundles:
- bundle = self.bundles.entries["%s.xml"%(bundlename)]
+ if self.bundles.entries.has_key("%s.xml"%(bundlename)):
+ bundle = self.bundles.entries["%s.xml"%(bundlename)]
+ else:
+ syslog(LOG_ERR, "Client %s requested nonexistent bundle %s"%(metadata.hostname, bundlename))
+ continue
b = Element("Bundle", name=bundlename)
for entry in bundle.entries:
if entry.tag != 'System':