From b303459508ae2b9858e625bbac340d1b3ce91884 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 27 Jul 2006 21:01:05 +0000 Subject: 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 --- src/lib/Client/Toolset.py | 9 +++++++-- 1 file 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 -- cgit v1.2.3-1-g7c22