From 7610cb919720b4493b5bfb9d794c08d20a238d39 Mon Sep 17 00:00:00 2001 From: "mathieu.segaud" Date: Thu, 11 Sep 2008 16:52:06 +0200 Subject: [PATCH] Small fix L'exception que recoit encode est UnicodeEncodeException, pas *Decode* (qui est reservee a decode ;)) darcs-hash:20080911145206-e59bf-2e8d61a80d3fb2a718133e5629b72206fce4a4e8.gz --- gestion/chgpass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gestion/chgpass.py b/gestion/chgpass.py index 6fa049fb..9a44abaa 100755 --- a/gestion/chgpass.py +++ b/gestion/chgpass.py @@ -59,7 +59,7 @@ Il ne doit pas ## 2 - Empeche les mots de passe non ASCII try: mdp = mdp.encode('ascii') - except UnicodeDecodeError: + except UnicodeEncodeError: cprint(u'Les accents ou caractères bizarres ne sont pas autorisés (mais #!@*&%{}| le sont !)', 'rouge') continue