summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-09 12:03:53 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-09 12:03:53 +0000
commit616c0ca17eb928b0e7683aa0b689806d54b88d97 (patch)
tree3ab08cb29844c32f04c71f917b7595101c38145e
parenta91d697e8419eed4fbb5a27daf35f297cc9c5689 (diff)
downloadportage-616c0ca17eb928b0e7683aa0b689806d54b88d97.tar.gz
portage-616c0ca17eb928b0e7683aa0b689806d54b88d97.tar.bz2
portage-616c0ca17eb928b0e7683aa0b689806d54b88d97.zip
Fix SubProcess._poll to handle a missing pid gracefully.
svn path=/main/trunk/; revision=10998
-rw-r--r--pym/_emerge/__init__.py2
1 files changed, 2 insertions, 0 deletions
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