14 lines
542 B
Diff
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)
|
||
|
|