From 8baa1aca8dfd35e3190d7d5655eb83b5b901e263 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Thu, 21 Apr 2011 10:42:53 +0200 Subject: Imported Upstream version 0.8.4.0 --- examples/python/nm-state.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/python/nm-state.py') diff --git a/examples/python/nm-state.py b/examples/python/nm-state.py index a79b3405..e7bb55f1 100644 --- a/examples/python/nm-state.py +++ b/examples/python/nm-state.py @@ -53,8 +53,11 @@ 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.Connection.Active", "Connection") - service_proxy = bus.get_object("org.freedesktop.NetworkManager", con_path) - con_iface = dbus.Interface(service_proxy, "org.freedesktop.NetworkManager.Settings.Connection") + con_service = prop_iface.Get("org.freedesktop.NetworkManager.Connection.Active", "ServiceName") + + # ask the provider of the connection for its details + service_proxy = bus.get_object(con_service, con_path) + con_iface = dbus.Interface(service_proxy, "org.freedesktop.NetworkManagerSettings.Connection") con_details = con_iface.GetSettings() con_name = con_details['connection']['id'] -- cgit 1.3.0-6-gf8a5