Make activating non-802-11-wireless devices work
This commit is contained in:
parent
32fa3dc65b
commit
a24dd155b4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user