diff frontends/src/bridge/bridge_frontend.py @ 1073:f094583732de

bridge: DBusException also transports the twisted failure condition
author souliane <souliane@mailoo.org>
date Sun, 15 Jun 2014 16:06:02 +0200
parents 95758ef3faa8
children 069ad98b360d
line wrap: on
line diff
--- a/frontends/src/bridge/bridge_frontend.py	Sun Jun 15 00:18:28 2014 +0200
+++ b/frontends/src/bridge/bridge_frontend.py	Sun Jun 15 16:06:02 2014 +0200
@@ -29,15 +29,17 @@
 class BridgeException(Exception):
     """An exception which has been raised from the backend and arrived to the frontend."""
 
-    def __init__(self, name, message):
+    def __init__(self, name, message='', condition=''):
         """
 
         @param name (str): full exception class name (with module)
         @param message (str): error message
+        @param condition (str) : error condition
         """
         Exception.__init__(self)
         self.fullname = unicode(name)
         self.message = unicode(message)
+        self.condition = unicode(condition) if condition else ''
         self.module, dummy, self.classname = unicode(self.fullname).rpartition('.')
 
     def __str__(self):