mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-05 02:05:10 +01:00
test: detect OS consistently using platform.system()
This commit is contained in:
@@ -17,6 +17,7 @@ from collections import deque
|
||||
import configparser
|
||||
import datetime
|
||||
import os
|
||||
import platform
|
||||
import time
|
||||
import shutil
|
||||
import signal
|
||||
@@ -42,8 +43,8 @@ except UnicodeDecodeError:
|
||||
CROSS = "x "
|
||||
CIRCLE = "o "
|
||||
|
||||
if os.name != 'nt' or sys.getwindowsversion() >= (10, 0, 14393): #type:ignore
|
||||
if os.name == 'nt':
|
||||
if platform.system() != 'Windows' or sys.getwindowsversion() >= (10, 0, 14393): #type:ignore
|
||||
if platform.system() == 'Windows':
|
||||
import ctypes
|
||||
kernel32 = ctypes.windll.kernel32 # type: ignore
|
||||
ENABLE_VIRTUAL_TERMINAL_PROCESSING = 4
|
||||
|
||||
Reference in New Issue
Block a user