From d7658f03abaf3e65385baf25b1de23b9ac6e53c3 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Tue, 12 Nov 2024 09:34:53 +0100 Subject: utils: disable fcntl in ogClient for Windows Add conditional import for fcntl as it is only supported for Linux and causes ogClient for Windows fail to start. --- src/utils/net.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/net.py b/src/utils/net.py index e842c0f..091bd26 100644 --- a/src/utils/net.py +++ b/src/utils/net.py @@ -7,12 +7,15 @@ # (at your option) any later version. import array -import fcntl +import sys import socket import struct import psutil import logging +if sys.platform != "win32": + import fcntl + def is_ethernet(interface): SIOCGIFHWADDR = 0x8927 ARPHRD_ETHER = 1 -- cgit v1.2.3-18-g5258