diff options
author | Thomas Grainger <tagrain@gmail.com> | 2023-01-20 22:25:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 22:25:38 (GMT) |
commit | 6b3993c556eb3bb36d1754a17643cddd3f6ade92 (patch) | |
tree | f1f902febd39059031f44840b997c16847eec2bb /Lib/platform.py | |
parent | 01093b82037fbae83623581294a0f1cf5b4a44b0 (diff) | |
download | cpython-6b3993c556eb3bb36d1754a17643cddd3f6ade92.zip cpython-6b3993c556eb3bb36d1754a17643cddd3f6ade92.tar.gz cpython-6b3993c556eb3bb36d1754a17643cddd3f6ade92.tar.bz2 |
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 <12621235+hauntsaninja@users.noreply.github.com>
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-x | Lib/platform.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/platform.py b/Lib/platform.py index b018046..2dfaf76 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -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)) @@ -824,6 +825,7 @@ class _Processor: ['uname', '-p'], stderr=subprocess.DEVNULL, text=True, + encoding="utf8", ).strip() except (OSError, subprocess.CalledProcessError): pass |