installdb: Real fix when Package tag is missing

This commit is contained in:
Fatih Aşıcı
2010-09-26 11:42:07 +00:00
parent 1f22537d0a
commit d46ce2ac20
+3
View File
@@ -86,6 +86,9 @@ class InstallDB(lazydb.LazyDB):
meta_doc = piksemel.parse(metadata_xml)
pkg = meta_doc.getTag("Package")
except:
pkg = None
if pkg is None:
# If package info is broken or not available, skip it.
ctx.ui.warning(_("Installation info for package '%s' is broken. "
"Reinstall it to fix this problem.") % package)