From 66ced4de564bc26e4799147dcce6fbbe1b430181 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 5 Jan 2015 13:52:27 +0100 Subject: libnm/tests: cleanup handling object paths in test-networkmanager-service.py --- tools/test-networkmanager-service.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py index 32ef05bb63..c3c2347138 100755 --- a/tools/test-networkmanager-service.py +++ b/tools/test-networkmanager-service.py @@ -74,7 +74,7 @@ class UnknownPropertyException(dbus.DBusException): def to_path_array(src): array = dbus.Array([], signature=dbus.Signature('o')) for o in src: - array.append(o.path) + array.append(to_path(o)) return array def to_path(src): @@ -414,7 +414,7 @@ class WifiDevice(Device): def add_test_ap(self, ssid, mac): ap = WifiAp(self._bus, ssid, mac, 0x1, 0x1cc, 0x1cc, 2412) self.add_ap(ap) - return ap.path + return ap def remove_ap_by_path(self, path): for ap in self.aps: @@ -546,7 +546,7 @@ class WimaxDevice(Device): def add_test_nsp(self, name): nsp = WimaxNsp(self._bus, name) self.add_nsp(nsp) - return nsp.path + return nsp def remove_nsp_by_path(self, path): for nsp in self.nsps: @@ -685,7 +685,7 @@ class NetworkManager(ExportedObj): for d in self.devices: # ignore iface/ip_iface distinction for now if d.iface == ip_iface: - return d.path + return to_path(d) raise UnknownDeviceException("No device found for the requested iface.") @dbus.service.method(dbus_interface=IFACE_NM, in_signature='ooo', out_signature='o') @@ -849,7 +849,7 @@ class NetworkManager(ExportedObj): raise PermissionDeniedException("Device already added") dev = WiredDevice(self._bus, ifname) self.add_device(dev) - return dbus.ObjectPath(dev.path) + return to_path(dev) @dbus.service.method(IFACE_TEST, in_signature='s', out_signature='o') def AddWifiDevice(self, ifname): @@ -858,7 +858,7 @@ class NetworkManager(ExportedObj): raise PermissionDeniedException("Device already added") dev = WifiDevice(self._bus, ifname) self.add_device(dev) - return dbus.ObjectPath(dev.path) + return to_path(dev) @dbus.service.method(IFACE_TEST, in_signature='s', out_signature='o') def AddWimaxDevice(self, ifname): @@ -867,7 +867,7 @@ class NetworkManager(ExportedObj): raise PermissionDeniedException("Device already added") dev = WimaxDevice(self._bus, ifname) self.add_device(dev) - return dbus.ObjectPath(dev.path) + return to_path(dev) @dbus.service.method(IFACE_TEST, in_signature='o', out_signature='') def RemoveDevice(self, path): @@ -881,7 +881,7 @@ class NetworkManager(ExportedObj): def AddWifiAp(self, ifname, ssid, mac): for d in self.devices: if d.iface == ifname: - return dbus.ObjectPath(d.add_test_ap(ssid, mac)) + return to_path(d.add_test_ap(ssid, mac)) raise UnknownDeviceException("Device not found") @dbus.service.method(IFACE_TEST, in_signature='so', out_signature='') @@ -896,7 +896,7 @@ class NetworkManager(ExportedObj): def AddWimaxNsp(self, ifname, name): for d in self.devices: if d.iface == ifname: - return dbus.ObjectPath(d.add_test_nsp(name)) + return to_path(d.add_test_nsp(name)) raise UnknownDeviceException("Device not found") @dbus.service.method(IFACE_TEST, in_signature='so', out_signature='') -- cgit v1.2.1