summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorKonstantin-Glukhov <glukhov.k@gmail.com>2021-07-13 19:21:48 (GMT)
committerGitHub <noreply@github.com>2021-07-13 19:21:48 (GMT)
commit0ee0a740e12ec8568aafa033aa6bb08b265afe26 (patch)
treea35a942e6482794ee6b333f8960553e52198e0af /Lib
parent6252670732c68420c2a8b3f0259559e45eed7610 (diff)
downloadcpython-0ee0a740e12ec8568aafa033aa6bb08b265afe26.zip
cpython-0ee0a740e12ec8568aafa033aa6bb08b265afe26.tar.gz
cpython-0ee0a740e12ec8568aafa033aa6bb08b265afe26.tar.bz2
bpo-44572: On Windows, disconnect STDIN in platform._syscmd_ver() to prevent erroneous STDIN consumption (GH-27092)
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/platform.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 02152f6..39c8ad5 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -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)