AsyncScheduler: source_remove in _wait
authorZac Medico <zmedico@gentoo.org>
Wed, 3 Oct 2012 10:18:46 +0000 (03:18 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 3 Oct 2012 10:18:46 +0000 (03:18 -0700)
pym/portage/util/_async/AsyncScheduler.py

index cae45fd90c07d1b6f3646977f775b60a6f2ebe7c..130331ec5cf7c14fb4bfdd92bbaf1558b2d3ac09 100644 (file)
@@ -80,6 +80,14 @@ class AsyncScheduler(AsynchronousTask, PollScheduler):
                while self._is_work_scheduled():
                        self.sched_iface.iteration()
 
+               if self._term_check_id is not None:
+                       self.sched_iface.source_remove(self._term_check_id)
+                       self._term_check_id = None
+
+               if self._loadavg_check_id is not None:
+                       self.sched_iface.source_remove(self._loadavg_check_id)
+                       self._loadavg_check_id = None
+
                if self._error_count > 0:
                        self.returncode = 1
                else: