summaryrefslogtreecommitdiffstats
path: root/phosphor-mapper
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2016-07-25 11:58:55 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2016-07-25 11:58:55 -0400
commitf89c64a0e8123899e7a84fe956e6f375e12e2897 (patch)
tree64f9da4d4cc131c77143ca90a2e2393364367727 /phosphor-mapper
parentb61ab7fcf14bee53db60376f9130b2b8ee58be94 (diff)
downloadphosphor-objmgr-f89c64a0e8123899e7a84fe956e6f375e12e2897.tar.gz
phosphor-objmgr-f89c64a0e8123899e7a84fe956e6f375e12e2897.zip
Pemove unnecessary variable
Change-Id: If036d653c54c2225bc2f14198b3b08b1f2aca109 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'phosphor-mapper')
-rw-r--r--phosphor-mapper18
1 files changed, 9 insertions, 9 deletions
diff --git a/phosphor-mapper b/phosphor-mapper
index e1f3635..b0b485b 100644
--- a/phosphor-mapper
+++ b/phosphor-mapper
@@ -43,13 +43,13 @@ def find_dbus_interfaces(conn, service, path, match):
self.results = {}
@staticmethod
- def _introspect(service, path):
+ def _introspect(path):
obj = conn.get_object(service, path, introspect=False)
iface = dbus.Interface(obj, dbus.INTROSPECTABLE_IFACE)
return iface.Introspect()
@staticmethod
- def _get_managed_objects(service, om):
+ def _get_managed_objects(om):
obj = conn.get_object(service, om, introspect=False)
iface = dbus.Interface(
obj, dbus.BUS_DAEMON_IFACE + '.ObjectManager')
@@ -63,9 +63,9 @@ def find_dbus_interfaces(conn, service, path, match):
def _to_path_elements(path):
return filter(bool, path.split('/'))
- def __call__(self, service, path):
+ def __call__(self, path):
self.results = {}
- self._find_interfaces(service, path)
+ self._find_interfaces(path)
return self.results
@staticmethod
@@ -73,10 +73,10 @@ def find_dbus_interfaces(conn, service, path, match):
return iface == dbus.BUS_DAEMON_IFACE + '.ObjectManager' \
or match(iface)
- def _find_interfaces(self, service, path):
+ def _find_interfaces(self, path):
path_elements = self._to_path_elements(path)
path = self._to_path(path_elements)
- root = ET.fromstring(self._introspect(service, path))
+ root = ET.fromstring(self._introspect(path))
ifaces = filter(
self._match,
@@ -84,7 +84,7 @@ def find_dbus_interfaces(conn, service, path, match):
self.results[path] = ifaces
if dbus.BUS_DAEMON_IFACE + '.ObjectManager' in ifaces:
- objs = self._get_managed_objects(service, path)
+ objs = self._get_managed_objects(path)
for k, v in objs.iteritems():
self.results[k] = v
else:
@@ -97,9 +97,9 @@ def find_dbus_interfaces(conn, service, path, match):
for x in sorted(children)]
for child in children:
if child not in self.results:
- self._find_interfaces(service, child)
+ self._find_interfaces(child)
- return _FindInterfaces()(service, path)
+ return _FindInterfaces()(path)
class Association(dbus.service.Object):
OpenPOWER on IntegriCloud