From 64bdc4c18c22f82c280b51cf06d1d544144ed556 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 5 May 2023 10:25:15 +0200 Subject: [PATCH] Fix import paths --- RNS/vendor/ifaddr/__init__.py | 6 +++--- RNS/vendor/ifaddr/_posix.py | 5 +---- RNS/vendor/ifaddr/_shared.py | 1 - RNS/vendor/ifaddr/_win32.py | 2 +- RNS/vendor/ifaddr/niwrapper.py | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/RNS/vendor/ifaddr/__init__.py b/RNS/vendor/ifaddr/__init__.py index 65c49fc..7b10423 100644 --- a/RNS/vendor/ifaddr/__init__.py +++ b/RNS/vendor/ifaddr/__init__.py @@ -21,12 +21,12 @@ import os -from ifaddr._shared import Adapter, IP +from RNS.vendor.ifaddr._shared import Adapter, IP if os.name == "nt": - from ifaddr._win32 import get_adapters + from RNS.vendor.ifaddr._win32 import get_adapters elif os.name == "posix": - from ifaddr._posix import get_adapters + from RNS.vendor.ifaddr._posix import get_adapters else: raise RuntimeError("Unsupported Operating System: %s" % os.name) diff --git a/RNS/vendor/ifaddr/_posix.py b/RNS/vendor/ifaddr/_posix.py index 5fb0d18..60ab3f8 100644 --- a/RNS/vendor/ifaddr/_posix.py +++ b/RNS/vendor/ifaddr/_posix.py @@ -27,10 +27,7 @@ import socket from typing import Iterable, Optional -import ifaddr._shared as shared - -# from ifaddr._shared import sockaddr, Interface, sockaddr_to_ip, ipv6_prefixlength - +import RNS.vendor.ifaddr._shared as shared class ifaddrs(ctypes.Structure): pass diff --git a/RNS/vendor/ifaddr/_shared.py b/RNS/vendor/ifaddr/_shared.py index 40f6edd..42939d3 100644 --- a/RNS/vendor/ifaddr/_shared.py +++ b/RNS/vendor/ifaddr/_shared.py @@ -26,7 +26,6 @@ import platform from typing import List, Optional, Tuple, Union - class Adapter(object): """ Represents a network interface device controller (NIC), such as a diff --git a/RNS/vendor/ifaddr/_win32.py b/RNS/vendor/ifaddr/_win32.py index 20b55ad..d577481 100644 --- a/RNS/vendor/ifaddr/_win32.py +++ b/RNS/vendor/ifaddr/_win32.py @@ -23,7 +23,7 @@ import ctypes from ctypes import wintypes from typing import Iterable, List -import ifaddr._shared as shared +import RNS.vendor.ifaddr._shared as shared NO_ERROR = 0 ERROR_BUFFER_OVERFLOW = 111 diff --git a/RNS/vendor/ifaddr/niwrapper.py b/RNS/vendor/ifaddr/niwrapper.py index 098b4f2..6bc2bf3 100644 --- a/RNS/vendor/ifaddr/niwrapper.py +++ b/RNS/vendor/ifaddr/niwrapper.py @@ -1,5 +1,5 @@ import ipaddress -import ifaddr +import RNS.vendor.ifaddr import socket from typing import List