Skip to content

Commit 5305908

Browse files
committed
Attempt to use UTF-8 to read egg-link files in package_index
1 parent 2675e85 commit 5305908

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

setuptools/package_index.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,9 @@ def scan_egg_links(self, search_path):
422422
list(itertools.starmap(self.scan_egg_link, egg_links))
423423

424424
def scan_egg_link(self, path, entry):
425-
with open(os.path.join(path, entry)) as raw_lines:
426-
# filter non-empty lines
427-
lines = list(filter(None, map(str.strip, raw_lines)))
425+
content = _read_utf8_with_fallback(os.path.join(path, entry))
426+
# filter non-empty lines
427+
lines = list(filter(None, map(str.strip, content.splitlines())))
428428

429429
if len(lines) != 2:
430430
# format is not recognized; punt

0 commit comments

Comments
 (0)