SubProcess._wait: add debug code for bug #403697
authorZac Medico <zmedico@gentoo.org>
Tue, 14 Feb 2012 23:51:22 +0000 (15:51 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 14 Feb 2012 23:51:22 +0000 (15:51 -0800)
pym/_emerge/SubProcess.py

index 17a3e8f20cdcddd5d340377b7b37f14dba12245b..926efa72b2dcdc132eabba3367b3b3eeb2126e99 100644 (file)
@@ -81,6 +81,12 @@ class SubProcess(AbstractPollTask):
                        if self.returncode is not None:
                                return self.returncode
 
+               if not isinstance(self.pid, int):
+                       # Get debug info for bug #403697.
+                       raise AssertionError(
+                               "%s: pid is non-integer: %s" %
+                               (self.__class__.__name__, repr(self.pid)))
+
                try:
                        # With waitpid and WNOHANG, only check the
                        # first element of the tuple since the second