Skip to content

Commit

Permalink
pythongh-100750: pass encoding='locale' kwarg in lib/platform.py
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Jan 4, 2023
1 parent c31e356 commit e18da85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Lib/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ def _syscmd_ver(system='', release='', version='',
stdin=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
text=True,
encoding="locale",
shell=True)
except (OSError, subprocess.CalledProcessError) as why:
#print('Command %s failed: %s' % (cmd, why))
Expand Down Expand Up @@ -824,6 +825,7 @@ def from_subprocess():
['uname', '-p'],
stderr=subprocess.DEVNULL,
text=True,
encoding="locale",
).strip()
except (OSError, subprocess.CalledProcessError):
pass
Expand Down

0 comments on commit e18da85

Please sign in to comment.