all: changes from python 2 syntax to python3 and removing dead code
There were python 2 methods that are not used anymore so now it's in python 3. Added helper fuctions so that the code is more clear https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/540
This commit is contained in:

committed by
Thomas Haller

parent
4d878d7012
commit
7baf615eaa
@@ -68,7 +68,6 @@ for d in devices:
|
||||
else:
|
||||
print("Device %s is not activated (state=%s)" % (name, device_states[state]))
|
||||
|
||||
|
||||
# Get active connection state
|
||||
manager_prop_iface = dbus.Interface(proxy, "org.freedesktop.DBus.Properties")
|
||||
active = manager_prop_iface.Get("org.freedesktop.NetworkManager", "ActiveConnections")
|
||||
@@ -90,4 +89,4 @@ for a in active:
|
||||
con_details = con_iface.GetSettings()
|
||||
con_name = con_details["connection"]["id"]
|
||||
|
||||
print("Connection '%s' is %s" % (con_name, connectivity_states[state].lower()))
|
||||
print("Connection '%s' is %s" % (con_name, connectivity_states[state]))
|
||||
|
Reference in New Issue
Block a user