aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/examples/howto/encrypt-file.py
diff options
context:
space:
mode:
authorBen McGinnes <[email protected]>2018-03-21 19:05:10 +0000
committerBen McGinnes <[email protected]>2018-03-21 19:05:10 +0000
commit7ddff71908a85111c8e0da41312197b3b1a77da6 (patch)
treebed4f0ce0504828778b66c221bad80d73667a3b7 /lang/python/examples/howto/encrypt-file.py
parentexample: key selection (diff)
downloadgpgme-7ddff71908a85111c8e0da41312197b3b1a77da6.tar.gz
gpgme-7ddff71908a85111c8e0da41312197b3b1a77da6.zip
examples: encryption
* Fixed two incorrect Context() objects.
Diffstat (limited to 'lang/python/examples/howto/encrypt-file.py')
-rwxr-xr-xlang/python/examples/howto/encrypt-file.py2
1 files changed, 1 insertions, 1 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()