diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-07-27 21:01:05 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-07-27 21:01:05 +0000 |
commit | b303459508ae2b9858e625bbac340d1b3ce91884 (patch) | |
tree | f6cc63cc436d6a2d672eacc342af336555be545a | |
parent | f54cb907c104a782c7513435328612f9411a5293 (diff) | |
download | bcfg2-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
-rw-r--r-- | src/lib/Client/Toolset.py | 9 |
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 |