Fix import paths

This commit is contained in:
Mark Qvist 2023-05-05 10:25:15 +02:00
parent 0889b8a7c5
commit 64bdc4c18c
5 changed files with 6 additions and 10 deletions

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,5 +1,5 @@
import ipaddress
import ifaddr
import RNS.vendor.ifaddr
import socket
from typing import List