[PATCH phosphor-rest-server v2 2/3] Handle differing dbus exception implementations
OpenBMC Patches
openbmc-patches at stwcx.xyz
Mon Apr 25 08:40:41 AEST 2016
From: Brad Bishop <bradleyb at us.ibm.com>
sdbus and python-dbus don't report the unknown interface
exception the same way, so add a workaround.
---
obmc-rest | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/obmc-rest b/obmc-rest
index 3a36406..226b1b7 100644
--- a/obmc-rest
+++ b/obmc-rest
@@ -34,6 +34,7 @@ import grp
import crypt
DBUS_UNKNOWN_INTERFACE = 'org.freedesktop.UnknownInterface'
+DBUS_UNKNOWN_INTERFACE_ERROR = 'org.freedesktop.DBus.Error.UnknownInterface'
DBUS_UNKNOWN_METHOD = 'org.freedesktop.DBus.Error.UnknownMethod'
DBUS_INVALID_ARGS = 'org.freedesktop.DBus.Error.InvalidArgs'
DBUS_TYPE_ERROR = 'org.freedesktop.DBus.Python.TypeError'
@@ -130,6 +131,9 @@ class RouteHandler(object):
if DBUS_UNKNOWN_INTERFACE in e.get_dbus_message():
# interface doesn't have any properties
return None
+ if DBUS_UNKNOWN_INTERFACE_ERROR in e.get_dbus_name():
+ # interface doesn't have any properties
+ return None
if DBUS_UNKNOWN_METHOD == e.get_dbus_name():
# properties interface not implemented at all
return None
--
2.8.1
More information about the openbmc
mailing list