Fix interface filter logic bug on GetSubTreePaths
This doesn't appear to have ever worked or only in very select
situations. When enumerating paths with a filter, handle path-
only elements with no interface data.
Resolves: openbmc/openbmc#2226
Change-Id: I50a8394c35d5f00f715b153bf6d0bb0b6f153bcf
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/obmc/mapper/server.py b/obmc/mapper/server.py
index e09bbbf..86539a9 100644
--- a/obmc/mapper/server.py
+++ b/obmc/mapper/server.py
@@ -583,7 +583,7 @@
x[1],
ifaces))
- return dict(filter(lambda x: x[1], map(obj_map, iter(item))))
+ return dict(filter(lambda x: x[1], map(obj_map, iter(item or []))))
@dbus.service.method(obmc.mapper.MAPPER_IFACE, 'sas', 'a{sas}')
def GetObject(self, path, interfaces):