diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2023-12-08 17:30:19 +0100 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2023-12-08 18:16:24 +0100 |
commit | 4c65ac96f8b021c107783adce3e8afe4f8edee6e (patch) | |
tree | b951d272fe8d814ce0d67c610ad3e7f3a658b388 /test/functional/test_runner.py | |
parent | 37324ae3dfb0e50daaf752dc863a880559fa4637 (diff) | |
download | bitcoin-4c65ac96f8b021c107783adce3e8afe4f8edee6e.tar.xz |
test: detect OS consistently using `platform.system()`
Diffstat (limited to 'test/functional/test_runner.py')
-rwxr-xr-x | test/functional/test_runner.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 6016a482f8..245c3b4b06 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -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 |