summaryrefslogtreecommitdiffstats
path: root/module/obmc/wsgi/apps/rest_dbus.py
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2019-01-14 12:54:43 -0600
committerAdriana Kobylak <anoo@us.ibm.com>2019-01-14 13:12:14 -0600
commit44573ab21aa463504344d311396e5c365b8ea41a (patch)
tree67fa13fae0c89cb16013bae5e80cb4f9609a4d04 /module/obmc/wsgi/apps/rest_dbus.py
parentdbc46919bddedb159d05558053963df40b2c9300 (diff)
downloadphosphor-rest-server-44573ab21aa463504344d311396e5c365b8ea41a.tar.gz
phosphor-rest-server-44573ab21aa463504344d311396e5c365b8ea41a.zip
rest_dbus: get_host_interface: Iterate through busnames
The mapper may return multiple busnames, as it's the case for an object that has associations. So if the path is not found on the busname, continue to see if there are more busnames to try instead of quitting on the first try. Fixes: openbmc/openbmc#3460 Tested: Verified the software interfaces are working again, and that a dummy busname still raises an exception for the case where none of the busnames returned by the mapper hold the requested path. Change-Id: Iaf36dd94f728d147f20c23666e5c19062b33f97a Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'module/obmc/wsgi/apps/rest_dbus.py')
-rw-r--r--module/obmc/wsgi/apps/rest_dbus.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/obmc/wsgi/apps/rest_dbus.py b/module/obmc/wsgi/apps/rest_dbus.py
index 0893d0b..a26532a 100644
--- a/module/obmc/wsgi/apps/rest_dbus.py
+++ b/module/obmc/wsgi/apps/rest_dbus.py
@@ -530,8 +530,11 @@ class PropertyHandler(RouteHandler):
properties_iface = dbus.Interface(
obj, dbus_interface=dbus.PROPERTIES_IFACE)
- info = self.get_host_interface_on_bus(
- path, prop, properties_iface, bus, interfaces)
+ try:
+ info = self.get_host_interface_on_bus(
+ path, prop, properties_iface, bus, interfaces)
+ except Exception:
+ continue
if info is not None:
prop, iface = info
return prop, iface, properties_iface
OpenPOWER on IntegriCloud