From 0901723ff483867558fe49c892c0c825942e1ac3 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Tue, 1 Jun 2021 23:56:15 +0200 Subject: Windows fix + Sorting based on list This fix introduces changes so that development can be done (and tested) on other platforms than Linux. This is a convenience fix and shouldn't break anything (simply a few Linux-specific imports that have moved into the functions where they are used). This commit also introduces sorting based on a list of priorities (where the default will be last if not matched). --- archinstall/lib/networking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'archinstall/lib/networking.py') diff --git a/archinstall/lib/networking.py b/archinstall/lib/networking.py index 0643c9cf..ac889528 100644 --- a/archinstall/lib/networking.py +++ b/archinstall/lib/networking.py @@ -1,4 +1,3 @@ -import fcntl import logging import os import socket @@ -12,6 +11,7 @@ from .storage import storage def get_hw_addr(ifname): + import fcntl s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', bytes(ifname, 'utf-8')[:15])) return ':'.join('%02x' % b for b in info[18:24]) -- cgit v1.2.3-70-g09d2