Skip to content

Commit c6cfde6

Browse files
miss-islingtongraingertblurb-it[bot]hauntsaninja
authored
gh-100750: pass encoding kwarg in lib/platform.py (GH-100751)
(cherry picked from commit 6b3993c) Co-authored-by: Thomas Grainger <tagrain@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
1 parent db0eeb3 commit c6cfde6

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))
@@ -762,6 +763,7 @@ def from_subprocess():
762763
['uname', '-p'],
763764
stderr=subprocess.DEVNULL,
764765
text=True,
766+
encoding="utf8",
765767
).strip()
766768
except (OSError, subprocess.CalledProcessError):
767769
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)