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 Gabi.Davar
Recipients Gabi.Davar, brian.curtin, loewis, ocean-city, sable, srid, tim.golden
Date 2013-03-25.20:52:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1364244773.96.0.0367993970987.issue10752@psf.upfronthosting.co.za>
In-reply-to
Content
possibly better patch - uses subprocess' quoting logic for argument handling:
diff -r 6fc9103d55f0 PCbuild/build_ssl.py
--- a/PCbuild/build_ssl.py	Sun Mar 24 14:54:25 2013 -0700
+++ b/PCbuild/build_ssl.py	Mon Mar 25 17:28:19 2013 +0200
@@ -47,10 +47,10 @@
 # is available.
 def find_working_perl(perls):
     for perl in perls:
-        fh = os.popen('"%s" -e "use Win32;"' % perl)
-        fh.read()
-        rc = fh.close()
-        if rc:
+        import subprocess
+        try:
+            subprocess.check_call([perl, '-e', 'use Win32;'], shell=True)
+        except subprocess.CalledProcessError:
             continue
         return perl
     print("Can not find a suitable PERL:")
History
Date User Action Args
2013-03-25 20:52:54Gabi.Davarsetrecipients: + Gabi.Davar, loewis, ocean-city, sable, tim.golden, brian.curtin, srid
2013-03-25 20:52:53Gabi.Davarsetmessageid: <1364244773.96.0.0367993970987.issue10752@psf.upfronthosting.co.za>
2013-03-25 20:52:53Gabi.Davarlinkissue10752 messages
2013-03-25 20:52:53Gabi.Davarcreate