Check package before getting version

This commit is contained in:
Faik Uygur
2008-02-28 08:36:28 +00:00
parent 04d88e01e0
commit 17fdebc702
+3
View File
@@ -23,6 +23,9 @@ installdb = pisi.db.installdb.InstallDB()
historydb = pisi.db.historydb.HistoryDB()
def __pkg_already_installed(name, pkginfo):
if not installdb.has_package(name):
return False
ver, rel, build = str(pkginfo).split("-")
if build == '?':
build = None