summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-11-12 09:34:53 +0100
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-11-15 10:47:05 +0100
commitd7658f03abaf3e65385baf25b1de23b9ac6e53c3 (patch)
tree0c64c4fdb06782a174f62812236d45386e81dcd3
parent90a9ba95439da95fafe7ba54eb02898f14f4113d (diff)
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.
-rw-r--r--src/utils/net.py5
1 files changed, 4 insertions, 1 deletions
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