Use PollScheduler iteration method.
[portage.git] / pym / _emerge / CompositeTask.py
index 644a69bb2eccc1d30f779fffb3fd7d87e4d359c2..e56188db125e93c781a49135b092557a90a0d906 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 from _emerge.AsynchronousTask import AsynchronousTask
@@ -60,7 +60,8 @@ class CompositeTask(AsynchronousTask):
                                        self._current_task = None
                                        break
                                else:
-                                       self.scheduler.schedule(condition=self._task_queued_wait)
+                                       while not self._task_queued_wait():
+                                               self.scheduler.iteration()
                                        if self.returncode is not None:
                                                break
                                        elif self.cancelled: