diff options
author | Justus Winter <[email protected]> | 2016-05-19 13:53:19 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-05-19 14:08:33 +0000 |
commit | 0d4e95621e05d50cd454049a424bb9ee098a5db6 (patch) | |
tree | 83b6922cbfde4ca8080b41fe166e8bcd84925f95 /lang/python/pyme/core.py | |
parent | python: Robust exception handling in callbacks. (diff) | |
download | gpgme-0d4e95621e05d50cd454049a424bb9ee098a5db6.tar.gz gpgme-0d4e95621e05d50cd454049a424bb9ee098a5db6.zip |
python: Improve progress callbacks.
* lang/python/helpers.c (pyProgressCb): Stash python errors, convert
'what' to Unicode object.
* lang/python/pyme/core.py (Context.set_progress_cb): Hand in 'self'.
* lang/python/tests/t-callbacks.py: Test progress callbacks.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'lang/python/pyme/core.py')
-rw-r--r-- | lang/python/pyme/core.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lang/python/pyme/core.py b/lang/python/pyme/core.py index 8a4c197e..9e7faf77 100644 --- a/lang/python/pyme/core.py +++ b/lang/python/pyme/core.py @@ -185,9 +185,9 @@ class Context(GpgmeWrapper): else: self.last_progresscb = pygpgme.new_PyObject_p_p() if hook == None: - hookdata = func + hookdata = (self, func) else: - hookdata = (func, hook) + hookdata = (self, func, hook) pygpgme.pygpgme_set_progress_cb(self.wrapped, hookdata, self.last_progresscb) def get_engine_info(self): |