summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorDavid James <davidjames@google.com>2011-03-16 21:54:37 -0700
committerZac Medico <zmedico@gentoo.org>2011-03-18 12:49:12 -0700
commit2b4d81caa05f5cb5aaf231ca25573c5547583c38 (patch)
treee341984bbe2605b6dacffc3fe729451cf79a3acd /pym
parent379b1e85b516ca17f0f220ec8ac9b9997a2b8c22 (diff)
downloadportage-2b4d81caa05f5cb5aaf231ca25573c5547583c38.tar.gz
portage-2b4d81caa05f5cb5aaf231ca25573c5547583c38.tar.bz2
portage-2b4d81caa05f5cb5aaf231ca25573c5547583c38.zip
Update Scheduler to protect against infinite loop
If we have running tasks, but we're not listening to these tasks, we're going to loop forever. So throw an exception in this case.
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/Scheduler.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py
index 5d190428f..fa4825cf2 100644
--- a/pym/_emerge/Scheduler.py
+++ b/pym/_emerge/Scheduler.py
@@ -1681,15 +1681,13 @@ class Scheduler(PollScheduler):
self._set_max_jobs(1)
while self._schedule():
- if self._poll_event_handlers:
- self._poll_loop()
+ self._poll_loop()
while True:
self._schedule()
if not self._is_work_scheduled():
break
- if self._poll_event_handlers:
- self._poll_loop()
+ self._poll_loop()
def _keep_scheduling(self):
return bool(not self._terminated_tasks and self._pkg_queue and \