diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-23 17:02:31 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-23 17:02:31 (GMT) |
commit | 75d8c5cea26912dd58f27689fbe9f7679e45aeb8 (patch) | |
tree | f314600d10b55375f26f58f145355458e4cc45b0 /Lib/sysconfig.py | |
parent | acd0fda1a46fa7d356c1e5de508dd33ce21e7a8f (diff) | |
download | cpython-75d8c5cea26912dd58f27689fbe9f7679e45aeb8.zip cpython-75d8c5cea26912dd58f27689fbe9f7679e45aeb8.tar.gz cpython-75d8c5cea26912dd58f27689fbe9f7679e45aeb8.tar.bz2 |
Issue #6011: sysconfig and distutils.sysconfig use the surrogateescape error
handler to parse the Makefile file. Avoid a UnicodeDecodeError if the source
code directory name contains a non-ASCII character and the locale encoding is
ASCII.
Diffstat (limited to 'Lib/sysconfig.py')
-rw-r--r-- | Lib/sysconfig.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 9b804e6..d38974c 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -215,7 +215,7 @@ def _parse_makefile(filename, vars=None): done = {} notdone = {} - with open(filename) as f: + with open(filename, errors="surrogateescape") as f: lines = f.readlines() for line in lines: |