path: root/module
diff options
authorAdriana Kobylak <>2017-12-13 11:46:50 -0600
committerAdriana Kobylak <>2017-12-14 13:20:54 -0600
commitf92cf4dbe00f4249f4efeb86886394cab324019a (patch)
tree3c22e9385cff951787a029f140dfd75e06d04659 /module
parentbc0c67380072ad3461cd9a0dfdb71dc37f54918d (diff)
downloadphosphor-rest-server-f92cf4dbe00f4249f4efeb86886394cab324019a.tar.gz Fix UnknownInterface error
The string "org.freedesktop.UnknownInterface" is not an existing dbus error string, all errors are of format *.DBus.Error.* so remove it. Also check the dbus name instead of message for this error. The dbus message is the description of the error, like "Unknown interface 'foo'". The dbus name is the actual error string, like "org.freedesktop.DBus.Error.UnknownInterface", Change-Id: Ib54adef852713bc30f3eefc6598e28fcf5be3d29 Signed-off-by: Adriana Kobylak <>
Diffstat (limited to 'module')
1 files changed, 2 insertions, 6 deletions
diff --git a/module/obmc/wsgi/apps/ b/module/obmc/wsgi/apps/
index b47ea4e..0ea921e 100644
--- a/module/obmc/wsgi/apps/
+++ b/module/obmc/wsgi/apps/
@@ -40,8 +40,7 @@ if have_wsock:
import gobject
import gevent
-DBUS_UNKNOWN_INTERFACE = 'org.freedesktop.UnknownInterface'
-DBUS_UNKNOWN_INTERFACE_ERROR = 'org.freedesktop.DBus.Error.UnknownInterface'
+DBUS_UNKNOWN_INTERFACE = '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'
@@ -244,10 +243,7 @@ class RouteHandler(object):
return f(*a)
except dbus.exceptions.DBusException, e:
- 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():
+ if DBUS_UNKNOWN_INTERFACE in e.get_dbus_name():
# interface doesn't have any properties
return None
if DBUS_UNKNOWN_METHOD == e.get_dbus_name():
OpenPOWER on IntegriCloud