mirror of
https://github.com/python/cpython.git
synced 2025-10-03 05:35:59 +00:00
gh-100750: pass encoding kwarg in lib/platform.py (GH-100751)
(cherry picked from commit 6b3993c556
)
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>
This commit is contained in:
parent
db0eeb381e
commit
c6cfde6fb1
2 changed files with 3 additions and 0 deletions
|
@ -285,6 +285,7 @@ def _syscmd_ver(system='', release='', version='',
|
||||||
stdin=subprocess.DEVNULL,
|
stdin=subprocess.DEVNULL,
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL,
|
||||||
text=True,
|
text=True,
|
||||||
|
encoding="locale",
|
||||||
shell=True)
|
shell=True)
|
||||||
except (OSError, subprocess.CalledProcessError) as why:
|
except (OSError, subprocess.CalledProcessError) as why:
|
||||||
#print('Command %s failed: %s' % (cmd, why))
|
#print('Command %s failed: %s' % (cmd, why))
|
||||||
|
@ -762,6 +763,7 @@ class _Processor:
|
||||||
['uname', '-p'],
|
['uname', '-p'],
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL,
|
||||||
text=True,
|
text=True,
|
||||||
|
encoding="utf8",
|
||||||
).strip()
|
).strip()
|
||||||
except (OSError, subprocess.CalledProcessError):
|
except (OSError, subprocess.CalledProcessError):
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
pass encoding kwarg to subprocess in platform
|
Loading…
Add table
Add a link
Reference in a new issue