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_framework/p2p.py | |
parent | 37324ae3dfb0e50daaf752dc863a880559fa4637 (diff) | |
download | bitcoin-4c65ac96f8b021c107783adce3e8afe4f8edee6e.tar.xz |
test: detect OS consistently using `platform.system()`
Diffstat (limited to 'test/functional/test_framework/p2p.py')
-rwxr-xr-x | test/functional/test_framework/p2p.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/test_framework/p2p.py b/test/functional/test_framework/p2p.py index b1ed97b794..34fe467d23 100755 --- a/test/functional/test_framework/p2p.py +++ b/test/functional/test_framework/p2p.py @@ -24,6 +24,7 @@ import asyncio from collections import defaultdict from io import BytesIO import logging +import platform import struct import sys import threading @@ -592,7 +593,7 @@ class NetworkThread(threading.Thread): NetworkThread.listeners = {} NetworkThread.protos = {} - if sys.platform == 'win32': + if platform.system() == 'Windows': asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) NetworkThread.network_event_loop = asyncio.new_event_loop() |