diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2020-11-14 15:07:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-14 15:07:47 (GMT) |
commit | 7a27c7ed4b2b45bb9ea27d3f5c4f423495d6e939 (patch) | |
tree | 6718788266a825093ecefcd7fe6ce503a78c1b12 /setup.py | |
parent | 2b39da49974bda523c5c1a8777bbe30dbafdcd12 (diff) | |
download | cpython-7a27c7ed4b2b45bb9ea27d3f5c4f423495d6e939.zip cpython-7a27c7ed4b2b45bb9ea27d3f5c4f423495d6e939.tar.gz cpython-7a27c7ed4b2b45bb9ea27d3f5c4f423495d6e939.tar.bz2 |
bpo-42351: Avoid error when opening header with non-UTF8 encoding (GH-23279)
grep_headers_for() would error out when a header contained
text that cannot be interpreted as UTF-8.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -241,7 +241,7 @@ def is_macosx_sdk_path(path): def grep_headers_for(function, headers): for header in headers: - with open(header, 'r') as f: + with open(header, 'r', errors='surrogateescape') as f: if function in f.read(): return True return False |