[entropy.spm] handle KeyError exceptions on remove_installed_package when calling get_installed_package_metadata()

This commit is contained in:
Fabio Erculiani
2009-09-15 08:34:18 +02:00
parent 4accf6f720
commit 25307f8ee0
@@ -1550,7 +1550,12 @@ class PortagePlugin(SpmPlugin):
# do not remove self
continue
myslot = self.get_installed_package_metadata(myatom, "SLOT")
try:
myslot = self.get_installed_package_metadata(myatom, "SLOT")
except KeyError:
# package got removed or not available or broken
continue
if myslot != slot:
continue
mybuild = self.get_installed_package_build_script_path(myatom)