Fix trying to remove a not installed package when returning the time after the operation #8 in the example

This commit is contained in:
Faik Uygur
2008-02-26 14:05:45 +00:00
parent 88ca19cde2
commit 7bcfb15444
+5 -1
View File
@@ -20,6 +20,9 @@ import pisi.db
import pisi.fetcher
def __listactions(actions):
installdb = pisi.db.installdb.InstallDB()
beinstalled = []
beremoved = []
@@ -28,7 +31,8 @@ def __listactions(actions):
if action == "install":
beinstalled.append("%s-%s" % (pkg, version))
else:
beremoved.append("%s" % pkg)
if installdb.has_package(pkg):
beremoved.append("%s" % pkg)
return beinstalled, beremoved