gpgme/lang/python/pyme
Justus Winter f526d0e22e
python: Make 'get_key' more idiomatic.
* lang/python/pyme/core.py (Context.get_key): Raise errors.KeyNotFound
if the key is not found.  This error is both a KeyError for idiomatic
error handling as well as a GPGMEError so we don't break existing
code.
* lang/python/pyme/errors.py (KeyNotFound): New class.
* lang/python/tests/support.py (no_such_key): New variable.
* lang/python/tests/t-keylist.py: Test the new behavior.

Signed-off-by: Justus Winter <justus@g10code.com>
2016-10-13 13:19:49 +02:00
..
constants python: Adapt to 'gpgme_op_interact'. 2016-09-16 14:56:29 +02:00
__init__.py python: Import from __future__ to align behavior of Python 2.7. 2016-09-14 12:15:57 +02:00
callbacks.py python: Import from __future__ to align behavior of Python 2.7. 2016-09-14 12:15:57 +02:00
core.py python: Make 'get_key' more idiomatic. 2016-10-13 13:19:49 +02:00
errors.py python: Make 'get_key' more idiomatic. 2016-10-13 13:19:49 +02:00
results.py python: Adapt to TOFU changes. 2016-09-14 14:32:48 +02:00
util.py python: Import from __future__ to align behavior of Python 2.7. 2016-09-14 12:15:57 +02:00
version.py.in python: Clarify that we support Python 2.7 too. 2016-09-14 14:36:29 +02:00