Skip to content

Commit e18da85

Browse files
committed
pythongh-100750: pass encoding='locale' kwarg in lib/platform.py
1 parent c31e356 commit e18da85

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/platform.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ def _syscmd_ver(system='', release='', version='',
285285
stdin=subprocess.DEVNULL,
286286
stderr=subprocess.DEVNULL,
287287
text=True,
288+
encoding="locale",
288289
shell=True)
289290
except (OSError, subprocess.CalledProcessError) as why:
290291
#print('Command %s failed: %s' % (cmd, why))
@@ -824,6 +825,7 @@ def from_subprocess():
824825
['uname', '-p'],
825826
stderr=subprocess.DEVNULL,
826827
text=True,
828+
encoding="locale",
827829
).strip()
828830
except (OSError, subprocess.CalledProcessError):
829831
pass

0 commit comments

Comments
 (0)