mirror of
https://github.com/python/cpython.git
synced 2026-01-27 05:05:50 +00:00
bpo-44572: On Windows, disconnect STDIN in platform._syscmd_ver() to prevent erroneous STDIN consumption (GH-27092)
(cherry picked from commit 0ee0a740e12ec8568aafa033aa6bb08b265afe26) Co-authored-by: Konstantin-Glukhov <glukhov.k@gmail.com>
This commit is contained in:
parent
94adfe6e2c
commit
5fc784e28a
@ -280,6 +280,7 @@ def _syscmd_ver(system='', release='', version='',
|
||||
for cmd in ('ver', 'command /c ver', 'cmd /c ver'):
|
||||
try:
|
||||
info = subprocess.check_output(cmd,
|
||||
stdin=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL,
|
||||
text=True,
|
||||
shell=True)
|
||||
|
||||
@ -0,0 +1 @@
|
||||
Avoid consuming standard input in the :mod:`platform` module
|
||||
Loading…
x
Reference in New Issue
Block a user