Prechádzať zdrojové kódy

Merge pull request #544 from exo-explore/usbadapterfix

add special case for USB adapter over ethernet
Alex Cheema 5 mesiacov pred
rodič
commit
7371e17550
1 zmenil súbory, kde vykonal 5 pridanie a 0 odobranie
  1. 5 0
      exo/helpers.py

+ 5 - 0
exo/helpers.py

@@ -262,6 +262,11 @@ async def get_macos_interface_type(ifname: str) -> Optional[Tuple[int, str]]:
         # Ethernet adapters
         if 'Ethernet' in hw_port:
           return (4, "Ethernet")
+        if 'USB' in hw_port:
+          if 'en' in ifname:
+            return (4, "Ethernet (USB Adapter)")
+          else:
+            return (4, "USB")
 
         # WiFi
         if hw_port == 'Wi-Fi':