Skip to content

Commit

Permalink
pythongh-100750: pass encoding kwarg in lib/platform.py (pythonGH-100751
Browse files Browse the repository at this point in the history
)

(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>
  • Loading branch information
3 people authored and miss-islington committed Feb 7, 2023
1 parent 25196d6 commit baff828
Show file tree
Hide file tree
Showing 2 changed files with 3 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 @@ -283,6 +283,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 @@ -753,6 +754,7 @@ def from_subprocess():
['uname', '-p'],
stderr=subprocess.DEVNULL,
text=True,
encoding="utf8",
).strip()
except (OSError, subprocess.CalledProcessError):
pass
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pass encoding kwarg to subprocess in platform

0 comments on commit baff828

Please sign in to comment.