mirror of
https://github.com/python/cpython.git
synced 2024-11-28 20:33:54 +08:00
bpo-45382: test.pythoninfo: set wmic.exe encoding to OEM (GH-30890)
This commit is contained in:
parent
ec7c17ea23
commit
cef0a5458f
@ -731,9 +731,12 @@ def collect_windows(info_add):
|
||||
|
||||
import subprocess
|
||||
try:
|
||||
# When wmic.exe output is redirected to a pipe,
|
||||
# it uses the OEM code page
|
||||
proc = subprocess.Popen(["wmic", "os", "get", "Caption,Version", "/value"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
encoding="oem",
|
||||
text=True)
|
||||
output, stderr = proc.communicate()
|
||||
if proc.returncode:
|
||||
|
Loading…
Reference in New Issue
Block a user