bpo-44572: On Windows, disconnect STDIN in platform._syscmd_ver() to prevent erroneous STDIN consumption (GH-27092)
This commit is contained in:
parent
6252670732
commit
0ee0a740e1
@ -280,6 +280,7 @@ def _syscmd_ver(system='', release='', version='',
|
|||||||
for cmd in ('ver', 'command /c ver', 'cmd /c ver'):
|
for cmd in ('ver', 'command /c ver', 'cmd /c ver'):
|
||||||
try:
|
try:
|
||||||
info = subprocess.check_output(cmd,
|
info = subprocess.check_output(cmd,
|
||||||
|
stdin=subprocess.DEVNULL,
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL,
|
||||||
text=True,
|
text=True,
|
||||||
shell=True)
|
shell=True)
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
Avoid consuming standard input in the :mod:`platform` module
|
Loading…
x
Reference in New Issue
Block a user