[PATCH phosphor-objmgr 3/8] Rename TagListMatch to ListMatch

OpenBMC Patches patches at stwcx.xyz
Thu Nov 5 03:33:29 AEDT 2015


From: Brad Bishop <bradleyb at us.ibm.com>

This match functor doesn't have anything to do with 'tags'.
---
 OpenBMCMapper.py | 10 +++++-----
 phosphor-mapper  |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/OpenBMCMapper.py b/OpenBMCMapper.py
index 3b6fe00..c1d2c78 100644
--- a/OpenBMCMapper.py
+++ b/OpenBMCMapper.py
@@ -48,12 +48,12 @@ class Path:
 def org_dot_openbmc_match(name):
 	return 'org.openbmc' in name
 
-class TagListMatch(object):
-	def __init__(self, tag_list):
-		self.tag_list = tag_list
+class ListMatch(object):
+	def __init__(self, l):
+		self.l = l
 
-	def __call__(self, tag):
-		return tag in self.tag_list
+	def __call__(self, match):
+		return match in self.l
 
 class IntrospectionNodeParser:
 	def __init__(self, data, tag_match = bool, intf_match = bool):
diff --git a/phosphor-mapper b/phosphor-mapper
index fda70c7..1a63317 100644
--- a/phosphor-mapper
+++ b/phosphor-mapper
@@ -174,7 +174,7 @@ class ObjectMapper(dbus.service.Object):
 		self.bus = bus
 		self.name_match = name_match
 		self.intf_match = intf_match
-		self.tag_match = OpenBMCMapper.TagListMatch(['children', 'interface'])
+		self.tag_match = OpenBMCMapper.ListMatch(['children', 'interface'])
 
 		self.discovery_done = False
 
-- 
2.6.0




More information about the openbmc mailing list