python3.11/00177-platform-unicode.patch
David Malcolm ff7dfb66f1 3.3.0-9: renumber patches to keep them in sync with python.spec
* Mon Mar 25 2013 David Malcolm <dmalcolm@redhat.com> - 3.3.0-9
- renumber patches to keep them in sync with python.spec

Specifically, renumber:
  00174 -> 00176
  00175 -> 00177
2013-03-25 16:01:59 -04:00

14 lines
542 B
Diff

Index: Python-3.3.0/Lib/platform.py
===================================================================
--- Python-3.3.0.orig/Lib/platform.py
+++ Python-3.3.0/Lib/platform.py
@@ -331,7 +331,7 @@ def linux_distribution(distname='', vers
return _dist_try_harder(distname,version,id)
# Read the first line
- with open('/etc/'+file, 'r') as f:
+ with open('/etc/'+file, 'r', encoding='utf-8', errors='surrogateescape') as f:
firstline = f.readline()
_distname, _version, _id = _parse_release_file(firstline)