diff options
author | 2024-05-21 09:33:05 +0200 | |
---|---|---|
committer | 2024-05-27 00:28:13 +0100 | |
commit | aa0a0c6f74ae28eb209ee933946e82917612b21e (patch) | |
tree | f045a7f677c553f9b9723326fd2f228fb1832ccc | |
parent | Scheduler: drop unreachable return statement in _schedule_tasks_imp() (diff) | |
download | portage-aa0a0c6f74ae28eb209ee933946e82917612b21e.tar.gz portage-aa0a0c6f74ae28eb209ee933946e82917612b21e.tar.bz2 portage-aa0a0c6f74ae28eb209ee933946e82917612b21e.zip |
Scheduler: convert state_change to boolean in _schedule_tasks_imp()
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Closes: https://github.com/gentoo/portage/pull/1324
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | lib/_emerge/Scheduler.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/_emerge/Scheduler.py b/lib/_emerge/Scheduler.py index c547c309c..d913cd2dc 100644 --- a/lib/_emerge/Scheduler.py +++ b/lib/_emerge/Scheduler.py @@ -1953,11 +1953,11 @@ class Scheduler(PollScheduler): @return: True if state changed, False otherwise. """ - state_change = 0 + state_change = False while True: if not self._keep_scheduling(): - return bool(state_change) + return state_change if ( self._choose_pkg_return_early @@ -1966,13 +1966,13 @@ class Scheduler(PollScheduler): or not self._can_add_job() or self._job_delay() ): - return bool(state_change) + return state_change pkg = self._choose_pkg() if pkg is None: - return bool(state_change) + return state_change - state_change += 1 + state_change = True if not pkg.installed: self._pkg_count.curval += 1 |