|
|
|
@ -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
|
|
|
|
|