summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@us.ibm.com>2016-04-01 14:53:05 -0400
committerBrad Bishop <bradleyb@us.ibm.com>2016-04-15 08:59:40 -0400
commitf4e7498892c883837a706e6a3cff454188db06a4 (patch)
treee94a64663873330f54d5ebe0d5a95c4853b3f08d
parent71527b4a664db6fc9b736a87e5a3543ae070ad3d (diff)
downloadphosphor-rest-server-f4e7498892c883837a706e6a3cff454188db06a4.tar.gz
phosphor-rest-server-f4e7498892c883837a706e6a3cff454188db06a4.zip
Handle differing dbus exception implementations
sdbus and python-dbus don't report the unknown interface exception the same way, so add a workaround.
-rw-r--r--obmc-rest4
1 files changed, 4 insertions, 0 deletions
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
OpenPOWER on IntegriCloud