Home GnuPG
Diffusion GPGME f526d0e22e8b

python: Make 'get_key' more idiomatic.
f526d0e22e8bUnpublished

Unpublished Commit ยท Learn More

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

Description

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>

Details

Provenance
justusAuthored on Oct 13 2016, 1:13 PM
Parents
rM1e6073ffa98d: python: Return public keys by default.
Branches
Unknown
Tags
Unknown

Event Timeline

Justus Winter <justus@g10code.com> committed rMf526d0e22e8b: python: Make 'get_key' more idiomatic. (authored by Justus Winter <justus@g10code.com>).Oct 13 2016, 1:19 PM