We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8699af7 commit e87f811Copy full SHA for e87f811
src/mozloc/cmd.py
@@ -3,6 +3,7 @@
3
import os
4
import functools
5
import shutil
6
+import subprocess
7
8
9
def running_as_root() -> bool:
@@ -17,11 +18,17 @@ def get_exe(name: str, path: str | None = None) -> str:
17
18
19
20
def get_airport() -> str:
- return get_exe(
21
+ exe = get_exe(
22
"airport",
23
"/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources",
24
)
25
26
+ msg = subprocess.check_output(exe, text=True, timeout=10)
27
+ if "WARNING: The airport command line tool is deprecated" in msg:
28
+ raise EnvironmentError(msg)
29
+
30
+ return exe
31
32
33
def get_nmcli() -> str:
34
return get_exe("nmcli")
0 commit comments