]> granicus.if.org Git - python/commitdiff
Issue #27407: Make PCbuild/prepare_ssl.py Python 2 compatible
authorZachary Ware <zachary.ware@gmail.com>
Mon, 5 Sep 2016 17:54:08 +0000 (12:54 -0500)
committerZachary Ware <zachary.ware@gmail.com>
Mon, 5 Sep 2016 17:54:08 +0000 (12:54 -0500)
PCbuild/prepare_ssl.py

index f6170f58083eb2dbb6ca8c8fc919e083a7c9f96f..d74697660f9ee1ef96882de269db0b0ad9aaa5a1 100644 (file)
@@ -18,6 +18,8 @@
 # it should configure OpenSSL such that it is ready to be built by
 # ssl.vcxproj on 32 or 64 bit platforms.
 
+from __future__ import print_function
+
 import os
 import re
 import sys
@@ -89,7 +91,10 @@ def create_asms(makefile, tmp_d):
 
 def copy_includes(makefile, suffix):
     dir = 'include'+suffix+'\\openssl'
-    os.makedirs(dir, exist_ok=True)
+    try:
+        os.makedirs(dir)
+    except OSError:
+        pass
     copy_if_different = r'$(PERL) $(SRC_D)\util\copy-if-different.pl'
     with open(makefile) as fin:
         for line in fin: