From 2d163053ee47a349b7e50c0907b89bcd91bef7d3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 10 Oct 2012 14:12:40 -0700 Subject: [PATCH] PollScheduler: fix _schedule() to return True This fixes a regression like bug #403895, introduced in commit b696337bf20fdc539ce7721df7a4b42b35999705, since functions have to return True in order to be continuously scheduled. --- pym/_emerge/PollScheduler.py | 6 ++++-- 1 file 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()) -- 2.26.2