From a24dd155b42c358a145429eb667720b989f6bb04 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 28 Mar 2007 17:37:46 -0400 Subject: [PATCH] Make activating non-802-11-wireless devices work --- shell/hardware/nmclient.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/hardware/nmclient.py b/shell/hardware/nmclient.py index 2492e051..7691e722 100644 --- a/shell/hardware/nmclient.py +++ b/shell/hardware/nmclient.py @@ -499,15 +499,15 @@ class NMClient(gobject.GObject): except dbus.DBusException: pass - def set_active_device(self, device, network): - net_op = "" + def set_active_device(self, device, network=None): + ssid = "" if network: - net_op = network.get_op() + ssid = network.get_ssid() try: # NM 0.6.4 and earlier have a bug which returns an # InvalidArguments error if no security information is passed # for wireless networks - self._nm_obj.setActiveDevice(device.get_op(), network.get_ssid()) + self._nm_obj.setActiveDevice(device.get_op(), ssid) except dbus.DBusException, e: if str(e).find("invalid arguments"): pass