summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2017-12-11 13:32:10 -0600
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-12-18 20:17:32 +0000
commita8f9765135a8c30acb195b23dcf8618baace097e (patch)
tree23c1f0bedc146996bce0b1037fa4d65d33d06603
parent799e7bc959540d57dfaae67b5cd495ca4163fb0f (diff)
downloadphosphor-objmgr-a8f9765135a8c30acb195b23dcf8618baace097e.tar.gz
phosphor-objmgr-a8f9765135a8c30acb195b23dcf8618baace097e.zip
bindings.py: Use get_dbus_name to check for error
Check the dbus name instead of message for error checking. 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", Resolves openbmc/openbmc#2463 Change-Id: I8721e7b262dbc8f4ebae9a8e30074bdf6a53b025 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
-rw-r--r--obmc/mapper/bindings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/obmc/mapper/bindings.py b/obmc/mapper/bindings.py
index e61a39c..d436bb3 100644
--- a/obmc/mapper/bindings.py
+++ b/obmc/mapper/bindings.py
@@ -82,7 +82,7 @@ class Mapper:
return f(*a)
except dbus.exceptions.DBusException, e:
if obmc.dbuslib.enums.DBUS_UNKNOWN_INTERFACE in \
- e.get_dbus_message():
+ e.get_dbus_name():
# interface doesn't have any properties
return None
if obmc.dbuslib.enums.DBUS_UNKNOWN_METHOD == e.get_dbus_name():
OpenPOWER on IntegriCloud