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()