diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-23 17:02:31 +0000 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-23 17:02:31 +0000 |
commit | b8f45f0354307c011fae735d579468727abd0787 (patch) | |
tree | 73455b7310e670e260f1567e44530aef3df30061 /Lib/sysconfig.py | |
parent | f7c83bfde202cb6346337bbcbb447ca0a7ecd5f3 (diff) | |
download | cpython-b8f45f0354307c011fae735d579468727abd0787.tar.gz |
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 9b804e6b88..d38974c561 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: |