summaryrefslogtreecommitdiff
path: root/portato/gui/queue.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-04-17 00:23:54 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-04-17 00:23:54 +0200
commitc700865daffd778e9e9eada8d2c5b4e37dc2798f (patch)
tree99667e033440782c7bfc5cfa8d6565b015a918e6 /portato/gui/queue.py
parent184755e6f8e9fc040daff11e6f6b6ea9a60aad2c (diff)
downloadportato-c700865daffd778e9e9eada8d2c5b4e37dc2798f.tar.gz
portato-c700865daffd778e9e9eada8d2c5b4e37dc2798f.tar.bz2
portato-c700865daffd778e9e9eada8d2c5b4e37dc2798f.zip
Rev. 198 done right
Diffstat (limited to '')
-rw-r--r--portato/gui/queue.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/portato/gui/queue.py b/portato/gui/queue.py
index 3ac9246..eb0a43e 100644
--- a/portato/gui/queue.py
+++ b/portato/gui/queue.py
@@ -175,11 +175,13 @@ class EmergeQueue:
elif type == "install": # remove only the intentionally added package
top = self.tree.first_iter(it)
parent = self.tree.parent_iter(it)
- while not self.tree.iter_equal(top, parent):
- parent = self.tree.parent_iter(parent)
- it = self.tree.parent_iter(it)
+
+ if parent:
+ while not self.tree.iter_equal(top, parent):
+ parent = self.tree.parent_iter(parent)
+ it = self.tree.parent_iter(it)
- self.remove_with_children(it, removeNewFlags = False)
+ self.remove_with_children(it, removeNewFlags = False)
if not self.tree.iter_has_children(top): # remove completely if nothing left
self.remove(top)