File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -97,12 +97,16 @@ async def list_networkdevice_details_async() -> None:
9797 if dev_type == DeviceType .WIFI .name :
9898 wifi = NetworkDeviceWireless (device_path )
9999 print ("Wifi: " , WiFiOperationMode (await wifi .mode ).name .title ())
100- ap = AccessPoint (await wifi .active_access_point )
101- ssid : bytes = await ap .ssid
102- if ssid :
103- print ("SSID: " , ssid .decode ("utf-8" , "ignore" ))
104- if await ap .strength :
105- print ("Signal: " , await ap .strength )
100+ ap_path = await wifi .active_access_point
101+ if ap_path == "/" :
102+ print ("No active access point" )
103+ else :
104+ ap = AccessPoint (ap_path )
105+ ssid : bytes = await ap .ssid
106+ if ssid :
107+ print ("SSID: " , ssid .decode ("utf-8" , "ignore" ))
108+ if await ap .strength :
109+ print ("Signal: " , await ap .strength )
106110 connection_id = await get_most_recent_connection_id (dev_name , dev_type )
107111 if connection_id :
108112 print ("Profile:" , connection_id )
You can’t perform that action at this time.
0 commit comments