darcs-hash:20071101122602-c992d-ea69b599a6b151650678b8a7146208434eda66f4.gz
This commit is contained in:
bos 2007-11-01 13:26:02 +01:00
parent d7f62f09bc
commit e355e6e436

View file

@ -63,17 +63,20 @@ def _controle_interactif_adherents(liste):
cprint(u'Arrêt du contrôle %s des membres actifs' % explicite, 'rouge')
break
def candidats():
todo_list1 = db.search('droits=*')['adherent']
todo_list = []
for adh in todo_list1:
if ('Bureau' not in adh.droits()) and ('Nounou' not in adh.droits()) and ('Apprenti' not in adh.droits()) and (adh.droits()!=['MultiMachines']) and (config.ann_scol not in adh.paiement()):
todo_list.append(adh)
todo_list.sort(lambda x, y: cmp((x.nom(), x.prenom()), (y.nom(), y.prenom())))
return todo_list
def lister():
"""
Afficher les câbleurs fantômes potentiels.
"""
todo_list1 = db.search('droits=*')['adherent']
todo_list = []
for adh in todo_list1:
if ('Bureau' not in adh.droits()) and ('Nounou' not in adh.droits()) and (adh.droits()!=['MultiMachines']) and (config.ann_scol not in adh.paiement()):
todo_list.append(adh)
todo_list.sort(lambda x, y: cmp((x.nom(), x.prenom()), (y.nom(), y.prenom())))
todo_list = candidats()
print "Liste des câbleur dont la cotisation n'est pas à jour."
print
for adh in todo_list:
@ -85,16 +88,8 @@ def controle_interactif():
"""
Procédure interactive de radiations des câbleurs fantômes.
"""
todo_list1 = db.search('droits=*')['adherent']
todo_list = []
for adh in todo_list1:
if ('Bureau' not in adh.droits()) and ('Nounou' not in adh.droits()) and (adh.droits()!=['MultiMachines']) and (config.ann_scol not in adh.paiement()):
todo_list.append(adh)
todo_list = candidats()
# Tri de la liste des adhérents selon nom, prénom
# Ça peut se faire plus facilement en Python 2.4 avec l'argument key
todo_list.sort(lambda x, y: cmp((x.nom(), x.prenom()), (y.nom(), y.prenom())))
# Zou !
_controle_interactif_adherents(todo_list)