diff options
-rw-r--r-- | pym/_emerge/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index a9d9c9179..8c9831dab 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -9460,12 +9460,15 @@ class Scheduler(PollScheduler): state_change = 0 - while not self._choose_pkg_return_early and \ - self._can_add_job(): + while True: if not self._pkg_queue or self._failed_pkgs: return (False, state_change) + if self._choose_pkg_return_early or \ + not self._can_add_job(): + return (True, state_change) + pkg = self._choose_pkg() if pkg is None: return (True, state_change) |