AsynchronousTask: tweak poll() logic
authorZac Medico <zmedico@gentoo.org>
Tue, 17 May 2011 21:32:33 +0000 (14:32 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 17 May 2011 21:32:33 +0000 (14:32 -0700)
pym/_emerge/AsynchronousTask.py

index cac1d5594dde4dc4647a9057d6d445b722cef0bd..36522ca4c941867566929df3659a61cf88b7289b 100644 (file)
@@ -31,10 +31,11 @@ class AsynchronousTask(SlotObject):
                return self.returncode is None
 
        def poll(self):
-               self._wait_hook()
                if self.returncode is not None:
                        return self.returncode
-               return self._poll()
+               self._poll()
+               self._wait_hook()
+               return self.returncode
 
        def _poll(self):
                return self.returncode