diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-09 12:03:53 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-09 12:03:53 +0000 |
commit | 616c0ca17eb928b0e7683aa0b689806d54b88d97 (patch) | |
tree | 3ab08cb29844c32f04c71f917b7595101c38145e | |
parent | a91d697e8419eed4fbb5a27daf35f297cc9c5689 (diff) | |
download | portage-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__.py | 2 |
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 |