diff --git a/src/core/sat_main.py b/src/core/sat_main.py index c1f460b1..e202c4de 100644 --- a/src/core/sat_main.py +++ b/src/core/sat_main.py @@ -861,7 +861,8 @@ class SAT(service.Service): 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 @@ class SAT(service.Service): 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: