From 0c5bf88da009ed146da925c9be0a8c29b8ec9d1e Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 15 Nov 2015 23:11:41 +0100 Subject: [PATCH] core: added callback_id in DataError message of launchCallback --- src/core/sat_main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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: