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:
|
except dbus.DBusException:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def set_active_device(self, device, network):
|
def set_active_device(self, device, network=None):
|
||||||
net_op = ""
|
ssid = ""
|
||||||
if network:
|
if network:
|
||||||
net_op = network.get_op()
|
ssid = network.get_ssid()
|
||||||
try:
|
try:
|
||||||
# NM 0.6.4 and earlier have a bug which returns an
|
# NM 0.6.4 and earlier have a bug which returns an
|
||||||
# InvalidArguments error if no security information is passed
|
# InvalidArguments error if no security information is passed
|
||||||
# for wireless networks
|
# 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:
|
except dbus.DBusException, e:
|
||||||
if str(e).find("invalid arguments"):
|
if str(e).find("invalid arguments"):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user