On 2014-11-25 22:42:01, Antoine Beaupré wrote: > Control: tags -1 +patch > > I believe the attached patch will fix the problem. > > From 330a9e6cbdd04475cea53122e12496f4e99e0104 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anar...@koumbit.org> > Date: Tue, 25 Nov 2014 22:29:12 -0500 > Subject: [PATCH] try to handle error when import actually works in GTK UI > (closes #770900)
Sorry, that was obviously the wrong patch, try this instead.
From cd4e18c0570e8e799a7d0122f22b50e18ec161d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anar...@koumbit.org> Date: Tue, 25 Nov 2014 22:17:01 -0500 Subject: [PATCH 1/2] encode prompt properly before prompting (closes #771032) this otherwise fails with non-ASCII translations --- monkeysign/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/monkeysign/cli.py b/monkeysign/cli.py index a72cc56..3511428 100644 --- a/monkeysign/cli.py +++ b/monkeysign/cli.py @@ -99,10 +99,11 @@ def choose_uid(self, prompt, key): prompt += _(' (1-%d or full UID, control-c to abort): ') % len(allowed_uids) - pattern = raw_input(prompt) + # workaround http://bugs.python.org/issue7768 + pattern = raw_input(prompt.encode(sys.stdout.encoding)) while not (pattern in allowed_uids or (pattern.isdigit() and int(pattern)-1 in range(0,len(allowed_uids)))): print _('invalid uid') - pattern = raw_input(prompt) + pattern = raw_input(prompt.encode(sys.stdout.encoding)) if pattern.isdigit(): pattern = allowed_uids[int(pattern)-1] return pattern -- 2.1.1
-- Au nom de l'état, la force s'appelle droit. Au main de l'individu, elle s'appelle crime. - Max Stirner
signature.asc
Description: PGP signature