mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Merge #12627: qa: Fix some tests to work on native windows
fa3528a85b qa: Fix some tests to work on native windows (MarcoFalke)
Pull request description:
This allows some more tests to be run natively on Windows
Tree-SHA512: 8097a82dc046be9f6bb0da634758c9afef7836960ca7a1f88f9acab9512dbf7bc26525b515faae407edab4620846cce2b427940298f822e250f23f924b4c7591
This commit is contained in:
@@ -9,7 +9,6 @@ Roughly based on http://voorloopnul.com/blog/a-python-netstat-in-less-than-100-l
|
||||
|
||||
import sys
|
||||
import socket
|
||||
import fcntl
|
||||
import struct
|
||||
import array
|
||||
import os
|
||||
@@ -90,6 +89,8 @@ def all_interfaces():
|
||||
'''
|
||||
Return all interfaces that are up
|
||||
'''
|
||||
import fcntl # Linux only, so only import when required
|
||||
|
||||
is_64bits = sys.maxsize > 2**32
|
||||
struct_size = 40 if is_64bits else 32
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
||||
Reference in New Issue
Block a user