From 7635d6a7f68585d91cbed791bfadebda1cce644f Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Tue, 23 Sep 2014 23:41:16 +0200 Subject: [PATCH] =?UTF-8?q?affich=5Ftools:=20=C3=A7a=20ne=20peut=20que=20m?= =?UTF-8?q?oins=20planter=20ainsi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/affich_tools.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gestion/affich_tools.py b/gestion/affich_tools.py index 9f7c4328..d0d37f77 100755 --- a/gestion/affich_tools.py +++ b/gestion/affich_tools.py @@ -187,7 +187,11 @@ def tableau(data, titre=None, largeur=None, alignement=None, format=None, dialog def reformate(data, format): if format == 's': - return unicode(data) + try: + return unicode(data) + except: + sys.stderr.write("Cannot cast to unicode %r\n" % data) + return unicode(data, errors='ignore') elif format == 'o' : data = float(data)