diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-17 10:54:41 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-03-17 10:54:41 (GMT) |
commit | 450bd873ac9a7d44d24498b67cd111ce77334e85 (patch) | |
tree | 5d75f9586632bdf7bbf3e68bf4cdc04f9f419340 | |
parent | e0cce8f8f00bf2c070cb1f564d950d62530df377 (diff) | |
download | cpython-450bd873ac9a7d44d24498b67cd111ce77334e85.zip cpython-450bd873ac9a7d44d24498b67cd111ce77334e85.tar.gz cpython-450bd873ac9a7d44d24498b67cd111ce77334e85.tar.bz2 |
Capturing the exit status for the build process didn't work. Using
popen2.Popen4() makes it work. Fixes #702180.
-rw-r--r-- | Lib/plat-mac/pimp.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/plat-mac/pimp.py b/Lib/plat-mac/pimp.py index 426177a..6664475 100644 --- a/Lib/plat-mac/pimp.py +++ b/Lib/plat-mac/pimp.py @@ -14,6 +14,7 @@ intention is that the end user will use this through a GUI. """ import sys import os +import popen2 import urllib import urllib2 import urlparse @@ -395,16 +396,15 @@ class PimpPackage: output.write("+ %s\n" % cmd) if NO_EXECUTE: return 0 - dummy, fp = os.popen4(cmd, "r") - dummy.close() + child = popen2.Popen4(cmd) + child.tochild.close() while 1: - line = fp.readline() + line = child.fromchild.readline() if not line: break if output: output.write(line) - rv = fp.close() - return rv + return child.wait() def downloadPackageOnly(self, output=None): """Download a single package, if needed. @@ -588,7 +588,8 @@ class PimpPackage_source(PimpPackage): if not installcmd: installcmd = '"%s" setup.py install' % sys.executable if self._cmd(output, self._buildDirname, installcmd): - return "install %s: running \"%s\" failed" % self.fullname() + return "install %s: running \"%s\" failed" % \ + (self.fullname(), installcmd) self.afterInstall() |