From 2fac017618a76882605125b05ff1f7393fe99860 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Fri, 28 Oct 2016 16:45:49 -0400 Subject: python: Rename Python module from PyME to gpg. This follows weeks of discussion on the gnupg-devel mailing list. Hopefully it will make it easier for people using Python to use GnuPG in the future. Signed-off-by: Daniel Kahn Gillmor --- lang/python/examples/encrypt-to-all.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lang/python/examples/encrypt-to-all.py') diff --git a/lang/python/examples/encrypt-to-all.py b/lang/python/examples/encrypt-to-all.py index 35873bde..bad4220c 100755 --- a/lang/python/examples/encrypt-to-all.py +++ b/lang/python/examples/encrypt-to-all.py @@ -26,9 +26,9 @@ from __future__ import absolute_import, print_function, unicode_literals del absolute_import, print_function, unicode_literals import sys -import pyme +import gpg -with pyme.Context(armor=True) as c: +with gpg.Context(armor=True) as c: recipients = list() for key in c.keylist(): valid = 0 @@ -42,7 +42,7 @@ with pyme.Context(armor=True) as c: try: ciphertext, _, _ = c.encrypt(b'This is my message.', recipients=recipients) - except pyme.errors.InvalidRecipients as e: + except gpg.errors.InvalidRecipients as e: print("Encryption failed for these keys:\n{0!s}".format(e)) # filter out the bad keys -- cgit v1.2.3