We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8faff9b commit 6a440dcCopy full SHA for 6a440dc
distro.py
@@ -920,7 +920,7 @@ def _get_lsb_release_info(self):
920
stdout = subprocess.check_output(cmd, stderr=devnull)
921
except OSError: # Command not found
922
return {}
923
- content = stdout.decode('UTF-8').splitlines()
+ content = stdout.decode(sys.getfilesystemencoding()).splitlines()
924
return self._parse_lsb_release_content(content)
925
926
@staticmethod
@@ -939,7 +939,6 @@ def _parse_lsb_release_content(lines):
939
"""
940
props = {}
941
for line in lines:
942
- line = line.decode('utf-8') if isinstance(line, bytes) else line
943
kv = line.strip('\n').split(':', 1)
944
if len(kv) != 2:
945
# Ignore lines without colon.
0 commit comments