Mercurial > libervia-backend
comparison src/bridge/bridge_constructor/dbus_frontend_template.py @ 1188:bf2927e6a0f5
frontends (dbus): error is not truncated anymore if it's not a SàT error.
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 08 Sep 2014 21:23:21 +0200 |
parents | f094583732de |
children | faa1129559b8 |
comparison
equal
deleted
inserted
replaced
1187:eb1144a22e20 | 1188:bf2927e6a0f5 |
---|---|
41 """Convert a DBusException to a BridgeException. | 41 """Convert a DBusException to a BridgeException. |
42 | 42 |
43 @param dbus_e (DBusException) | 43 @param dbus_e (DBusException) |
44 @return: BridgeException | 44 @return: BridgeException |
45 """ | 45 """ |
46 name = dbus_e.get_dbus_name()[len(const_ERROR_PREFIX) + 1:] | 46 full_name = dbus_e.get_dbus_name() |
47 if full_name.startswith(const_ERROR_PREFIX): | |
48 name = dbus_e.get_dbus_name()[len(const_ERROR_PREFIX) + 1:] | |
49 else: | |
50 name = full_name | |
47 # XXX: dbus_e.args doesn't contain the original DBusException args, but we | 51 # XXX: dbus_e.args doesn't contain the original DBusException args, but we |
48 # receive its serialized form in dbus_e.args[0]. From that we can rebuild | 52 # receive its serialized form in dbus_e.args[0]. From that we can rebuild |
49 # the original arguments list thanks to ast.literal_eval (secure eval). | 53 # the original arguments list thanks to ast.literal_eval (secure eval). |
50 message = dbus_e.get_dbus_message() # similar to dbus_e.args[0] | 54 message = dbus_e.get_dbus_message() # similar to dbus_e.args[0] |
51 try: | 55 try: |