CompositeTask._start_task: propagate scheduler
authorZac Medico <zmedico@gentoo.org>
Tue, 16 Oct 2012 19:27:46 +0000 (12:27 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 16 Oct 2012 19:27:46 +0000 (12:27 -0700)
pym/_emerge/CompositeTask.py
pym/portage/util/_async/PopenProcess.py

index 3e434780bef59b514d20da54c46a95cae8109637..40cf8596b8a51fe3d4aec8dc6001c2adced00b5f 100644 (file)
@@ -142,6 +142,10 @@ class CompositeTask(AsynchronousTask):
                a task.
 
                """
+               try:
+                       task.scheduler = self.scheduler
+               except AttributeError:
+                       pass
                task.addExitListener(exit_handler)
                self._current_task = task
                task.start()
index c3ae6e9db81634fe55be8a8700dfa717a225b11a..37d32f26016281517d9565cfb135ec280fde7f9f 100644 (file)
@@ -14,6 +14,10 @@ class PopenProcess(SubProcess):
 
        def _start(self):
                if self.pipe_reader is not None:
+                       try:
+                               self.pipe_reader.scheduler = self.scheduler
+                       except AttributeError:
+                               pass
                        self.pipe_reader.addExitListener(self._pipe_reader_exit)
                        self.pipe_reader.start()