Handle differing dbus exception implementations
sdbus and python-dbus don't report the unknown interface
exception the same way, so add a workaround.
diff --git a/obmc-rest b/obmc-rest
index 3a36406..226b1b7 100644
--- a/obmc-rest
+++ b/obmc-rest
@@ -34,6 +34,7 @@
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 @@
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