diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2008-07-17 13:10:53 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2008-07-17 13:10:53 +0100 |
commit | 1cbb5a302724041dab107a8634cbea6b0fe1bc99 (patch) | |
tree | 62c97727b71d13a8f96cb6c13f5b1be20954138a /dbus/service.py | |
parent | 5235d4028fc863fe81d8aa7ccbe2d5f0830fd392 (diff) | |
parent | 8c2ef87d94525af4b1e7f21e18b0a07b30ab425b (diff) | |
download | dbus-python-1cbb5a302724041dab107a8634cbea6b0fe1bc99.tar.gz |
Merge branch 'master' into purity
Conflicts:
NEWS
_dbus_bindings/containers.c
dbus/connection.py
Diffstat (limited to 'dbus/service.py')
-rw-r--r-- | dbus/service.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dbus/service.py b/dbus/service.py index 141d1a3..acaa85d 100644 --- a/dbus/service.py +++ b/dbus/service.py @@ -278,7 +278,10 @@ def _method_reply_error(connection, message, exception): name = 'org.freedesktop.DBus.Python.%s.%s' % (exception.__module__, exception.__class__.__name__) et, ev, etb = sys.exc_info() - if ev is exception: + if isinstance(exception, DBusException) and not exception.include_traceback: + # We don't actually want the traceback anyway + contents = exception.get_dbus_message() + elif ev is exception: # The exception was actually thrown, so we can get a traceback contents = ''.join(traceback.format_exception(et, ev, etb)) else: |