summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-10 14:12:40 -0700
committerZac Medico <zmedico@gentoo.org>2012-10-10 14:12:40 -0700
commit2d163053ee47a349b7e50c0907b89bcd91bef7d3 (patch)
treeedc07f63166dc3e16ca61dc038f1d5dff1e631e5
parentAtom: support *_beta* wildcard, bug #437872 (diff)
downloadportage-2.2.0_alpha137.tar.gz
portage-2.2.0_alpha137.tar.bz2
portage-2.2.0_alpha137.zip
PollScheduler: fix _schedule() to return Truev2.2.0_alpha137
This fixes a regression like bug #403895, introduced in commit b696337bf20fdc539ce7721df7a4b42b35999705, since functions have to return True in order to be continuously scheduled.
-rw-r--r--pym/_emerge/PollScheduler.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/_emerge/PollScheduler.py b/pym/_emerge/PollScheduler.py
index d02b0dafc..220394b41 100644
--- a/pym/_emerge/PollScheduler.py
+++ b/pym/_emerge/PollScheduler.py
@@ -115,15 +115,17 @@ class PollScheduler(object):
Calls _schedule_tasks() and automatically returns early from
any recursive calls to this method that the _schedule_tasks()
call might trigger. This makes _schedule() safe to call from
- inside exit listeners.
+ inside exit listeners. This method always returns True, so that
+ it may be scheduled continuously via EventLoop.timeout_add().
"""
if self._scheduling:
- return False
+ return True
self._scheduling = True
try:
self._schedule_tasks()
finally:
self._scheduling = False
+ return True
def _is_work_scheduled(self):
return bool(self._running_job_count())