summaryrefslogtreecommitdiff
path: root/portato/gui/updater.py
diff options
context:
space:
mode:
authorNecoro <>2008-01-25 10:22:45 +0000
committerNecoro <>2008-01-25 10:22:45 +0000
commit43bb555d0925f447a89b0e3559d63704e4bafea0 (patch)
treeb16aa6a018e9304a878492cf07e33e2aaafa300e /portato/gui/updater.py
parentd46f2db937f04c6c366816273aaf0209f742a502 (diff)
downloadportato-43bb555d0925f447a89b0e3559d63704e4bafea0.tar.gz
portato-43bb555d0925f447a89b0e3559d63704e4bafea0.tar.bz2
portato-43bb555d0925f447a89b0e3559d63704e4bafea0.zip
r725@Devoty: necoro | 2008-01-25 11:21:07 +0100
small bug fixes
Diffstat (limited to 'portato/gui/updater.py')
-rw-r--r--portato/gui/updater.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/portato/gui/updater.py b/portato/gui/updater.py
index f0d4c90..fb80118 100644
--- a/portato/gui/updater.py
+++ b/portato/gui/updater.py
@@ -15,7 +15,7 @@ from __future__ import absolute_import
from ..backend import system
import threading, subprocess, time
-from ..helper import debug
+from ..helper import debug, error
class Updater (object):
"""
@@ -85,7 +85,7 @@ q
This is done here.
"""
- pkgs = [l.get_cpv() for l in system.find_packages("=%s" % pv)]
+ pkgs = system.find_packages("=%s" % pv, only_cpv = True)
if len(pkgs) > 1: # ambigous - try to find the one which is also in the iterators
for p in pkgs:
@@ -93,6 +93,7 @@ q
return p
elif not pkgs: # nothing found =|
error(_("Trying to remove package '%s' from queue which does not exist in system."), pv)
+ return None
else: # only one choice =)
return pkgs[0]
@@ -100,6 +101,11 @@ q
"""
Remove a package from the queue.
"""
+
+ if cpv is None:
+ debug("Nothing to remove.")
+ return
+
try:
self.queue.remove(self.iterators[cpv])
except KeyError: