summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-07-27 21:01:05 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-07-27 21:01:05 +0000
commitb303459508ae2b9858e625bbac340d1b3ce91884 (patch)
treef6cc63cc436d6a2d672eacc342af336555be545a /src
parentf54cb907c104a782c7513435328612f9411a5293 (diff)
downloadbcfg2-b303459508ae2b9858e625bbac340d1b3ce91884.tar.gz
bcfg2-b303459508ae2b9858e625bbac340d1b3ce91884.tar.bz2
bcfg2-b303459508ae2b9858e625bbac340d1b3ce91884.zip
Fix corner case where extra packages appear not to be installed (?)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2009 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Client/Toolset.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/Client/Toolset.py b/src/lib/Client/Toolset.py
index a02d11a92..61af1ebad 100644
--- a/src/lib/Client/Toolset.py
+++ b/src/lib/Client/Toolset.py
@@ -204,8 +204,13 @@ class Toolset(object):
extra = lxml.etree.SubElement(stats, "Extra")
[lxml.etree.SubElement(extra, "Service", name=svc, current_status='on')
for svc in self.extra_services]
- [lxml.etree.SubElement(extra, "Package", name=pkg,
- current_version=self.installed[pkg]) for pkg in self.pkgwork['remove']]
+ for pkg in self.pkgwork['remove']:
+ if pkg in self.installed:
+ lxml.etree.SubElement(extra, "Package", name=pkg,
+ current_version=self.installed[pkg])
+ else:
+ lxml.etree.SubElement(extra, "Package", name=pkg)
+ self.logger.error("Failed to find installed version of packages %s" % (pkg))
return stats
# the next two are dispatch functions