From e89706bfc3df3e209ed3ab943c89c9fc79c04668 Mon Sep 17 00:00:00 2001 From: bernat Date: Thu, 21 Apr 2005 11:21:45 +0200 Subject: [PATCH] Factorisation darcs-hash:20050421092145-d1718-a76da38bbce5f7e58fe8c0f830c2596873a4dee6.gz --- gestion/tools/liste_adh.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gestion/tools/liste_adh.py b/gestion/tools/liste_adh.py index ec2924e7..8a8c1f2a 100755 --- a/gestion/tools/liste_adh.py +++ b/gestion/tools/liste_adh.py @@ -26,17 +26,13 @@ for bat in bats + '?' : # remplissage de la liste ######################### -# les batiments -for bat in bats : - adhs = db.search( 'chbre=%s*&paiement=ok' % bat )['adherent'] - for adh in adhs : - liste[bat].append( u'%s %s' % ( adh.nom(), adh.prenom() ) ) - # les extérieurs adhs = db.search( 'paiement=ok&etudes!=Pers' )['adherent'] for adh in adhs : - if not adh.chbre()[0] in bats : - liste['?'].append( u'%s %s' % ( adh.nom(), adh.prenom() ) ) + bat = adh.chbre()[0] + if not bat in bats : + bat = '?' + liste[bat].append( u'%s %s' % ( adh.nom(), adh.prenom() ) ) # création du fichier tex #########################