examples: update for user settings removal
Some of the example code broke when we removed user settings services. Oops!
This commit is contained in:
@@ -70,14 +70,13 @@ def connection_to_string(config):
|
||||
print ""
|
||||
|
||||
|
||||
def print_one_services_connections(service_name, desc):
|
||||
def print_connections():
|
||||
# Ask the settings service for the list of connections it provides
|
||||
service_name = "org.freedesktop.NetworkManager"
|
||||
proxy = bus.get_object(service_name, "/org/freedesktop/NetworkManagerSettings")
|
||||
settings = dbus.Interface(proxy, "org.freedesktop.NetworkManagerSettings")
|
||||
connection_paths = settings.ListConnections()
|
||||
|
||||
print "%s connections --------------------------------------------\n" % desc
|
||||
|
||||
# List each connection's name, UUID, and type
|
||||
for path in connection_paths:
|
||||
con_proxy = bus.get_object(service_name, path)
|
||||
@@ -106,7 +105,5 @@ def print_one_services_connections(service_name, desc):
|
||||
|
||||
print ""
|
||||
|
||||
# Print out connection information for all connections
|
||||
print_one_services_connections("org.freedesktop.NetworkManagerSystemSettings", "System")
|
||||
print_one_services_connections("org.freedesktop.NetworkManagerUserSettings", "User")
|
||||
print_connections()
|
||||
|
||||
|
Reference in New Issue
Block a user