From 9da196c3629c65a757266c3d2079e9b57e344430 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 8 Jul 2008 10:28:43 +0000 Subject: [PATCH] Use a normal list instead of a deque for Scheduler._pkg_queue since deque doesn't have a remove() method until python-2.5. svn path=/main/trunk/; revision=10984 --- pym/_emerge/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 8d7a925d7..66f5ce4ee 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -7642,7 +7642,7 @@ class Scheduler(object): self._add_task = self._task_queues.prefetch.add self._prefetchers = weakref.WeakValueDictionary() - self._pkg_queue = deque() + self._pkg_queue = [] self._completed_tasks = set() self._failed_pkgs = [] self._failed_fetches = [] @@ -8073,7 +8073,7 @@ class Scheduler(object): self._main_loop() finally: # discard remaining packages if necessary - pkg_queue.clear() + del pkg_queue[:] self._completed_tasks.clear() self._digraph = None self._task_queues.prefetch.clear() @@ -8089,7 +8089,7 @@ class Scheduler(object): def _choose_pkg(self): if self._max_jobs < 2: - return self._pkg_queue.popleft() + return self._pkg_queue.pop(0) self._prune_digraph() -- 2.26.2