Home GnuPG
Diffusion GPGME 05896c210f7f

python: Try to be more helpful when given a string to encrypt().
05896c210f7fUnpublished

Unpublished Commit ยท Learn More

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

Description

python: Try to be more helpful when given a string to encrypt().

* lang/python/helpers.c (_gpg_obj2gpgme_data_t): Extended error
message.
* lang/python/tests/t-encrypt.py: Test for "encode" in error message.

The motivation is to help the user when encrypting fails. I claim that
it is not obvious to not being able to encrypt a string directly. To
nudge the user into encoding it to bytes, the error message is a bit
extended.

  • Signed-off-by: Tobias Mueller <muelli@cryptobitch.de>

Details

Provenance
4tmuelleAuthored on Dec 2 2016, 11:37 PM
justusCommitted on Dec 5 2016, 12:44 PM
Parents
rMfb7f4cb973ab: python: Define a macro for wrapping fragile result objects.
Branches
Unknown
Tags
Unknown

Event Timeline

Justus Winter <justus@g10code.com> committed rM05896c210f7f: python: Try to be more helpful when given a string to encrypt(). (authored by Tobias Mueller <muelli@cryptobitch.de>).Dec 5 2016, 12:44 PM