From: Zac Medico Date: Tue, 26 Oct 2010 18:48:42 +0000 (-0700) Subject: Raise StopIteration from _poll() if needed. X-Git-Tag: v2.2.0_alpha2~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0288c187e5f500e42a3981a7bffa00957309a8d1;p=portage.git Raise StopIteration from _poll() if needed. --- diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 874a4fd73..dfa73c948 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -325,6 +325,11 @@ class Scheduler(PollScheduler): if timeout is None: while True: + if not self._poll_event_handlers: + self._schedule() + if not self._poll_event_handlers: + raise StopIteration( + "timeout is None and there are no poll() event handlers") previous_count = len(self._poll_event_queue) PollScheduler._poll(self, timeout=self._max_display_latency) self._status_display.display()