changeset 1603:2b82d846848e

core: added callback_id in DataError message of launchCallback
author Goffi <goffi@goffi.org>
date Sun, 15 Nov 2015 23:11:41 +0100
parents 33728a2f17bf
children 9ac78437000d
files src/core/sat_main.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/sat_main.py	Sun Nov 15 23:11:38 2015 +0100
+++ b/src/core/sat_main.py	Sun Nov 15 23:11:41 2015 +0100
@@ -861,7 +861,8 @@
         return progress_all
 
     def registerCallback(self, callback, *args, **kwargs):
-        """ Register a callback.
+        """Register a callback.
+
         Use with_data=True in kwargs if the callback use the optional data dict
         use force_id=id to avoid generated id. Can lead to name conflict, avoid if possible
         use one_shot=True to delete callback once it have been called
@@ -910,7 +911,7 @@
         try:
             callback, args, kwargs = self._cb_map[callback_id]
         except KeyError:
-            raise exceptions.DataError("Unknown callback id")
+            raise exceptions.DataError(u"Unknown callback id {}".format(callback_id))
 
         if kwargs.get("with_data", False):
             if data is None: