From 11aacb6a6d57d92080ee1c93d6711f2ec29913cc Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 12 Mar 2011 10:35:23 -0800 Subject: [PATCH] Scheduler: fix AttributeError in _terminate_tasks Thanks to David James for reporting this error: AttributeError: 'EbuildPhase' object has no attribute 'merge' --- pym/_emerge/Scheduler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 2f49c3420..de635b2b3 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -301,7 +301,10 @@ class Scheduler(PollScheduler): for build in self._task_queues.jobs._task_queue: self._running_tasks.remove(build.pkg) for merge in self._task_queues.merge._task_queue: - self._running_tasks.remove(merge.merge.pkg) + # Setup phases may be scheduled in this queue, but + # we're only interested in the PackageMerge instances. + if isinstance(merge, PackageMerge): + self._running_tasks.remove(merge.merge.pkg) for q in self._task_queues.values(): q.clear() -- 2.26.2