[PATCH pyphosphor 4/5] Remove unnecessary variable

OpenBMC Patches openbmc-patches at stwcx.xyz
Wed Jun 29 07:10:45 AEST 2016


From: Brad Bishop <bradleyb at fuzziesquirrel.com>

Signed-off-by: Brad Bishop <bradleyb at fuzziesquirrel.com>
---
 obmc/dbuslib/introspection.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/obmc/dbuslib/introspection.py b/obmc/dbuslib/introspection.py
index ec252c6..9444d13 100644
--- a/obmc/dbuslib/introspection.py
+++ b/obmc/dbuslib/introspection.py
@@ -142,13 +142,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')
@@ -162,9 +162,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
@@ -172,10 +172,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,
@@ -183,7 +183,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:
@@ -196,6 +196,6 @@ 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)
-- 
2.9.0




More information about the openbmc mailing list