From 7bcfb1544482b36722c1224b086cf3a986ff73d8 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Tue, 26 Feb 2008 14:05:45 +0000 Subject: [PATCH] Fix trying to remove a not installed package when returning the time after the operation #8 in the example --- pisi/operations/history.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pisi/operations/history.py b/pisi/operations/history.py index b5854164..8696afe0 100644 --- a/pisi/operations/history.py +++ b/pisi/operations/history.py @@ -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