From 616c0ca17eb928b0e7683aa0b689806d54b88d97 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 9 Jul 2008 12:03:53 +0000 Subject: [PATCH] Fix SubProcess._poll to handle a missing pid gracefully. svn path=/main/trunk/; revision=10998 --- pym/_emerge/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 1c652e691..a696e5c2b 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1703,6 +1703,8 @@ class SubProcess(AsynchronousTask): def _poll(self): if self.returncode is not None: return self.returncode + if self.pid is None: + return self.returncode retval = os.waitpid(self.pid, os.WNOHANG) if retval == (0, 0): return None -- 2.26.2