Fix infinite loop in CompositeTask._wait().
authorZac Medico <zmedico@gentoo.org>
Tue, 8 Jul 2008 16:59:40 +0000 (16:59 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 8 Jul 2008 16:59:40 +0000 (16:59 -0000)
svn path=/main/trunk/; revision=10986

pym/_emerge/__init__.py

index d7cd8fa112cce377a2315ee606d3b5ffb2caf0fd..f0a0a687cba180b8879fca98b8923c0bd1867936 100644 (file)
@@ -1579,11 +1579,14 @@ class CompositeTask(AsynchronousTask):
 
        def _wait(self):
 
+               prev = None
                while True:
                        task = self._current_task
-                       if task is None:
+                       if task is None or task is prev:
+                               # don't wait for the same task more than once
                                break
                        task.wait()
+                       prev = task
 
                return self.returncode