File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -61,18 +61,17 @@ def connect(conn_type=config.type_hotspot,
61
61
logger .info (f"Added connection of type { conn_type } " )
62
62
63
63
# Find this connection and its device
64
- connections = NetworkManager . Settings . ListConnections ()
65
- connections = dict ([(x .GetSettings ()['connection' ]['id' ], x )
66
- for x in connections ])
64
+ connections = \
65
+ dict ([(x .GetSettings ()['connection' ]['id' ], x )
66
+ for x in NetworkManager . Settings . ListConnections () ])
67
67
conn = connections [config .ap_name ]
68
68
69
69
# Find a suitable device
70
70
ctype = conn .GetSettings ()['connection' ]['type' ]
71
71
dtype = {'802-11-wireless' : NetworkManager .NM_DEVICE_TYPE_WIFI } \
72
72
.get (ctype , ctype )
73
- devices = NetworkManager .NetworkManager .GetDevices ()
74
73
75
- for dev in devices :
74
+ for dev in NetworkManager . NetworkManager . GetDevices () :
76
75
if dev .DeviceType == dtype :
77
76
break
78
77
else :
You can’t perform that action at this time.
0 commit comments