debug scan
This commit is contained in:
1 parent
effd91fece
commit
f68676c6f8
1 file changed
+1
@@ -187,6 +187,7 @@ def connect_wifi(ssid, password):
|
|||||||
def disconnect_wifi():
|
def disconnect_wifi():
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output(['nmcli', 'dev', 'disconnect', 'iface', 'wlan0'])
|
output = subprocess.check_output(['nmcli', 'dev', 'disconnect', 'iface', 'wlan0'])
|
||||||
|
time.sleep(1)
|
||||||
output_str = output.decode('utf-8') # 将输出转换为字符串
|
output_str = output.decode('utf-8') # 将输出转换为字符串
|
||||||
if "successfully disconnected" in output_str:
|
if "successfully disconnected" in output_str:
|
||||||
print(f"{datetime.datetime.now()}: Wi-Fi disconnected successfully")
|
print(f"{datetime.datetime.now()}: Wi-Fi disconnected successfully")
|
||||||
|
|||||||
Reference in new issue
Block a user