From 0adfe858cc3cbd2f53673deb5c126130468becbd Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Tue, 25 Aug 2015 20:44:36 +0200 Subject: [PATCH] =?UTF-8?q?Ne=20plante=20pas=20si=20l'objet=20est=20un=20c?= =?UTF-8?q?lub=20et=20non=20un=20adh=C3=A9rent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/tools/whosthere.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gestion/tools/whosthere.py b/gestion/tools/whosthere.py index 45cf2c51..83c15326 100755 --- a/gestion/tools/whosthere.py +++ b/gestion/tools/whosthere.py @@ -54,8 +54,12 @@ def pretty_name(item): try: nom = unicode(item['nom'][0]) - prenom = unicode(item['prenom'][0]) - v = prenom + u" " + nom + try: + prenom = unicode(item['prenom'][0]) + v = prenom + u" " + nom + #Si c'est un club + except KeyError: + v = nom except KeyError: nom = unicode(item['host'][0]) v = nom