[git] GPGME - branch, master, updated. gpgme-1.11.1-118-ga256d84
[email protected] (by Ben McGinnes)
| Newsgroups | gmane.comp.encryption.gpg.cvs |
|---|---|
| Message-ID | <[email protected]> |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".
The branch, master has been updated
via a256d84882616341b3f357340533893a1db8b5c1 (commit)
from ed5ef8293cdbfcc3b91268eeae1eb6b4f8d271bb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a256d84882616341b3f357340533893a1db8b5c1
Author: Ben McGinnes <[email protected]>
Date: Tue Aug 14 02:48:38 2018 +1000
Symmetric encryption example
* lang/python/examples/howto/symcrypt-file.py: Fixed the error code
and the passphrase key word arg.
diff --git a/lang/python/examples/howto/symcrypt-file.py b/lang/python/examples/howto/symcrypt-file.py
index 2b24284..2e6ece4 100755
--- a/lang/python/examples/howto/symcrypt-file.py
+++ b/lang/python/examples/howto/symcrypt-file.py
@@ -46,18 +46,18 @@ with open(filename, "rb") as f:
with gpg.Context(armor=True) as ca:
try:
- ciphertext, result, sign_result = ca.encrypt(text, passphrase=None,
+ ciphertext, result, sign_result = ca.encrypt(text, passphrase=True,
sign=False)
with open("{0}.asc".format(filename), "wb") as fa:
fa.write(ciphertext)
- except gpg.errors.InvalidRecipients as e:
+ except gpg.errors.GPGMEError as e:
print(e)
with gpg.Context() as cg:
try:
- ciphertext, result, sign_result = cg.encrypt(text, passphrase=None,
+ ciphertext, result, sign_result = cg.encrypt(text, passphrase=True,
sign=False)
with open("{0}.gpg".format(filename), "wb") as fg:
fg.write(ciphertext)
- except gpg.errors.InvalidRecipients as e:
+ except gpg.errors.GPGMEError as e:
print(e)
-----------------------------------------------------------------------
Summary of changes:
lang/python/examples/howto/symcrypt-file.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
GnuPG Made Easy
http://git.gnupg.org