[entropy.server] catch KeyError on match_installed_package()

This commit is contained in:
Fabio Erculiani
2011-09-07 21:55:59 +02:00
parent fcee11c19b
commit abd985eef2

View File

@@ -5699,8 +5699,11 @@ class Server(Client):
try:
key, slot = dbconn.retrieveKeySlot(idpackage)
slot = slot.split(",")[0]
trashed = self.Spm().match_installed_package(
key+":"+slot)
try:
trashed = self.Spm().match_installed_package(
key+":"+slot)
except KeyError:
trashed = True
except TypeError: # referred to retrieveKeySlot
trashed = True
if not trashed: