[object Object]

← back to Exo

use psutil for mac detection

f4619d467b4a1397fb0bc5b2be12431586865492 · 2024-12-06 23:10:47 +0000 · Alex Cheema

Files touched

Diff

commit f4619d467b4a1397fb0bc5b2be12431586865492
Author: Alex Cheema <alexcheema123@gmail.com>
Date:   Fri Dec 6 23:10:47 2024 +0000

    use psutil for mac detection
---
 exo/helpers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exo/helpers.py b/exo/helpers.py
index d5c0e152..da253b21 100644
--- a/exo/helpers.py
+++ b/exo/helpers.py
@@ -247,7 +247,7 @@ def get_interface_priority_and_type(ifname: str) -> Tuple[int, str]:
     return (6, "Loopback")
 
   # On macOS, use networksetup to accurately identify interface types
-  if platform.system() == 'Darwin':
+  if psutil.MACOS:
     try:
       import subprocess
       result = subprocess.run(['networksetup', '-listallhardwareports'], capture_output=True, text=True)

← f257c21e mac os network interface name  ·  back to Exo  ·  macos interface type 02ee8b7d →