From c700865daffd778e9e9eada8d2c5b4e37dc2798f Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 17 Apr 2008 00:23:54 +0200 Subject: Rev. 198 done right --- portato/gui/queue.py | 10 ++++++---- 1 file 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) -- cgit v1.2.3-70-g09d2