examples: update for user settings removal

Some of the example code broke when we removed user settings services.
Oops!
This commit is contained in:
Daniel Gnoutcheff
2010-08-06 21:02:50 -04:00
parent f8a92d44cb
commit 8b1cac703c
3 changed files with 9 additions and 15 deletions

View File

@@ -53,10 +53,7 @@ for a in active:
# needed to connect to a specific network. Lets get those details so we
# can find the user-readable name of the connection.
con_path = prop_iface.Get("org.freedesktop.NetworkManager.ActiveConnection", "Connection")
con_service = prop_iface.Get("org.freedesktop.NetworkManager.ActiveConnection", "ServiceName")
# ask the provider of the connection for its details
service_proxy = bus.get_object(con_service, con_path)
service_proxy = bus.get_object("org.freedesktop.NetworkManagerSystemSettings", con_path)
con_iface = dbus.Interface(service_proxy, "org.freedesktop.NetworkManagerSettings.Connection")
con_details = con_iface.GetSettings()
con_name = con_details['connection']['id']