if self._pkg_count.curval >= self._pkg_count.maxval:
return
+ self._main_loop_cleanup()
+
logger = self._logger
pkg_count = self._pkg_count
mtimedb = self._mtimedb
try:
self._main_loop()
finally:
- # discard remaining packages if necessary
- del pkg_queue[:]
- self._completed_tasks.clear()
- self._digraph = None
- self._task_queues.fetch.clear()
-
+ self._main_loop_cleanup()
# discard any failures and return the
# exist status of the last one
if failed_pkgs:
return rval
+ def _main_loop_cleanup(self):
+ del self._pkg_queue[:]
+ self._completed_tasks.clear()
+ self._digraph = None
+ self._task_queues.fetch.clear()
+
def _choose_pkg(self):
"""
Choose a task that has all it's dependencies satisfied.