Skip to content

Commit 6b3993c

Browse files
graingertblurb-it[bot]hauntsaninja
authored
gh-100750: pass encoding kwarg in lib/platform.py (#100751)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Shantanu <[email protected]>
1 parent 01093b8 commit 6b3993c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-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="utf8",
827829
).strip()
828830
except (OSError, subprocess.CalledProcessError):
829831
pass
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pass encoding kwarg to subprocess in platform

0 commit comments

Comments
 (0)