Home GnuPG
Diffusion GPGME d90857a08c4f

python: Robust exception handling in callbacks.
d90857a08c4fUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

python: Robust exception handling in callbacks.

* lang/python/helpers.c (pygpgme_stash_callback_exception): New
function.
(pygpgme_raise_callback_exception): Likewise.
(pyPassphraseCb): Stash python errors.
* lang/python/helpers.h (pygpgme_raise_callback_exception): New
prototype.
* lang/python/pyme/core.py ({Context,Data}.__init__): Move common
initialization to superclass.
(Context.set_progress_cb): Hand in 'self'.
* lang/python/pyme/util.py (GpgmeWrapper.__init__): New function.
(GpgmeWrapper.__getattr__): Raise stashed exceptions.
* lang/python/tests/Makefile.am (py_tests): Add new test.
* lang/python/tests/t-callbacks.py: New file.
  • Signed-off-by: Justus Winter <justus@gnupg.org>

Details

Provenance
justusAuthored on May 19 2016, 11:03 AM
Parents
rM2f748b5a2d16: Qt: Check for graphviz and set HAVE_DOT correctly
Branches
Unknown
Tags
Unknown

Event Timeline

Justus Winter <justus@gnupg.org> committed rMd90857a08c4f: python: Robust exception handling in callbacks. (authored by Justus Winter <justus@gnupg.org>).May 19 2016, 3:58 PM