[Python-checkins] cpython (3.4): Issue #21623: open pyproject.props with an explicit encoding

zach.ware python-checkins at python.org
Mon Jun 2 19:16:30 CEST 2014


http://hg.python.org/cpython/rev/1d36bd258ee8
changeset:   90971:1d36bd258ee8
branch:      3.4
parent:      90969:932532360578
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Mon Jun 02 12:09:13 2014 -0500
summary:
  Issue #21623: open pyproject.props with an explicit encoding

files:
  PCbuild/build_ssl.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/PCbuild/build_ssl.py b/PCbuild/build_ssl.py
--- a/PCbuild/build_ssl.py
+++ b/PCbuild/build_ssl.py
@@ -66,7 +66,7 @@
 # Fetch SSL directory from VC properties
 def get_ssl_dir():
     propfile = (os.path.join(os.path.dirname(__file__), 'pyproject.props'))
-    with open(propfile) as f:
+    with open(propfile, encoding='utf-8-sig') as f:
         m = re.search('openssl-([^<]+)<', f.read())
         return "..\..\openssl-"+m.group(1)
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list