Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0ee0a74

Browse files
author
Konstantin-Glukhov
authored
bpo-44572: On Windows, disconnect STDIN in platform._syscmd_ver() to prevent erroneous STDIN consumption (GH-27092)
1 parent6252670 commit0ee0a74

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

‎Lib/platform.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ def _syscmd_ver(system='', release='', version='',
280280
forcmdin ('ver','command /c ver','cmd /c ver'):
281281
try:
282282
info=subprocess.check_output(cmd,
283+
stdin=subprocess.DEVNULL,
283284
stderr=subprocess.DEVNULL,
284285
text=True,
285286
shell=True)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Avoid consuming standard input in the:mod:`platform` module

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp