Skip to content

Commit

Permalink
gh-100750: pass encoding kwarg in lib/platform.py (GH-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
4 people authored Jan 21, 2023
1 parent db0eeb3 commit c6cfde6
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 @@ -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 @@ -762,6 +763,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 c6cfde6

Please sign in to comment.