Home GnuPG

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

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
rGPGMEPYd8b8cf87397b: python: Define a macro for wrapping fragile result objects.
Branches
Unknown
Tags
Unknown

Event Timeline