From 7ddff71908a85111c8e0da41312197b3b1a77da6 Mon Sep 17 00:00:00 2001 From: Ben McGinnes Date: Thu, 22 Mar 2018 06:05:10 +1100 Subject: [PATCH] examples: encryption * Fixed two incorrect Context() objects. --- lang/python/examples/howto/encrypt-file.py | 2 +- lang/python/examples/howto/encrypt-sign-file.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/python/examples/howto/encrypt-file.py b/lang/python/examples/howto/encrypt-file.py index 877226d0..ad4e1cef 100755 --- a/lang/python/examples/howto/encrypt-file.py +++ b/lang/python/examples/howto/encrypt-file.py @@ -48,7 +48,7 @@ else: a_key = input("Enter the fingerprint or key ID to encrypt to: ") filename = input("Enter the path and filename to encrypt: ") -rkey = list(c.keylist(pattern=a_key, secret=False)) +rkey = list(gpg.Context().keylist(pattern=a_key, secret=False)) with open(filename, "rb") as f: text = f.read() diff --git a/lang/python/examples/howto/encrypt-sign-file.py b/lang/python/examples/howto/encrypt-sign-file.py index 4b29b27b..41aaac86 100755 --- a/lang/python/examples/howto/encrypt-sign-file.py +++ b/lang/python/examples/howto/encrypt-sign-file.py @@ -51,7 +51,7 @@ else: a_key = input("Enter the fingerprint or key ID to encrypt to: ") filename = input("Enter the path and filename to encrypt: ") -rkey = list(c.keylist(pattern=a_key, secret=False)) +rkey = list(gpg.Context().keylist(pattern=a_key, secret=False)) with open(filename, "rb") as f: text = f.read()