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>
This commit is contained in:
Thomas Grainger 2023-01-20 22:25:38 +00:00 committed by GitHub
parent 01093b8203
commit 6b3993c556
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -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