[Pkg-gnupg-commit] [gpgme] 84/412: python: Fix simple example.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 22 21:26:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gpgme.
commit bbeee5e1a060f2d1e37a08220eb552cf4673a058
Author: Justus Winter <justus at gnupg.org>
Date: Wed May 11 13:51:40 2016 +0200
python: Fix simple example.
* lang/python/examples/simple.py: Flush stdout, encode name as
UTF-8 before passing it to GPGME.
Signed-off-by: Justus Winter <justus at gnupg.org>
---
lang/python/examples/simple.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lang/python/examples/simple.py b/lang/python/examples/simple.py
index 5693d40..739291e 100755
--- a/lang/python/examples/simple.py
+++ b/lang/python/examples/simple.py
@@ -36,8 +36,9 @@ c.set_armor(1)
# Set up the recipients.
sys.stdout.write("Enter name of your recipient: ")
+sys.stdout.flush()
name = sys.stdin.readline().strip()
-c.op_keylist_start(name, 0)
+c.op_keylist_start(name.encode(), 0)
r = c.op_keylist_next()
if r == None:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list