This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author srid
Recipients srid
Date 2010-12-21.23:09:40
SpamBayes Score 4.073415e-05
Marked as misclassified No
Message-id <1292972982.57.0.365932571977.issue10752@psf.upfronthosting.co.za>
In-reply-to
Content
I noticed that despite ActivePerl being installed, `os.popen(...).close()` returned 1 (see find_working_perl in build_ssl.py), while in actuality that command executed successfully with return code 0; I verified this by using the subprocess module.

Here's a patch:

--- python/PCbuild/build_ssl.py.orig
+++ python/PCbuild/build_ssl.py
@@ -45,11 +45,11 @@
 # Being a Perl dummy, the simplest way I can check is if the "Win32" package
 # is available.
 def find_working_perl(perls):
+    import subprocess
     for perl in perls:
-        fh = os.popen('"%s" -e "use Win32;"' % perl)
-        fh.read()
-        rc = fh.close()
-        if rc:
+        try:
+            subprocess.check_call('"%s" -e "use Win32;"' % perl, shell=True)
+        except subprocess.CalledProcessError:
             continue
         return perl
     print("Can not find a suitable PERL:")
History
Date User Action Args
2010-12-21 23:09:42sridsetrecipients: + srid
2010-12-21 23:09:42sridsetmessageid: <1292972982.57.0.365932571977.issue10752@psf.upfronthosting.co.za>
2010-12-21 23:09:40sridlinkissue10752 messages
2010-12-21 23:09:40sridcreate