From e6493434664bd187905d15e190cae1706f5376ea Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Fri, 30 Aug 2013 19:44:41 +0200 Subject: [PATCH] [ldap_crans] utf-8 encode of ValueError MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit str() faisait en fait un str(e.message), donc voilà, c'est plutôt équivalent dans le cas où type(e.message) == str --- gestion/ldap_crans.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 0a577f7f..f05e2bec 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -1963,7 +1963,7 @@ class BaseProprietaire(BaseClasseCrans): try: validate_mail(mail1) except ValueError, e: - print coul(str(e), 'rouge') + print coul(e.message.encode('utf-8'), 'rouge') continue mail2 = prompt(u"Adresse mail (répéter) ?") if mail1 == mail2 and mail1: