chambres_vides: dé-harde les homes

This commit is contained in:
Daniel STAN 2014-08-14 22:28:40 +02:00
parent 6e8991239b
commit e0ee29e139
2 changed files with 4 additions and 3 deletions

View file

@ -204,7 +204,7 @@ comptes_inactifs.py
date = strftime(u'%d/%m/%Y %H:%M', localtime(date))
else:
date = u'Jamais'
forward = os.path.isfile('/home/%s/.forward' % login) and u'X' or u''
forward = os.path.isfile(os.path.join(a.home(), '.forward')) and u'X' or u''
mail = nb_mails_non_lus(login)
mail = mail == None and u'?' or mail > 0 and u'X' or u' '
ligne = (a.id(), login, a.Nom(), date, forward, mail)
@ -234,7 +234,7 @@ comptes_inactifs.py
(doit être exécuté en tant que root).
"""
# Nombre de personnes concernées, en expansant de droite à gauche :
# inscrit/ancien, avec/sans procmail, avec/sans mail non lu
# inscrit/ancien, avec/sans .forward, avec/sans mail non lu
# Voir aussi template_path
stats = [0, 0, 0, 0, 0, 0, 0, 0]
@ -253,7 +253,7 @@ comptes_inactifs.py
# est-ce un membre inscrit ?
if ann_scol not in a.paiement(): i += 4
# a-t-il un .forward ?
if not os.path.isfile('/home/%s/.forward' % login): i += 2
if not os.path.isfile(os.path.join(a.home(), '.forward')): i += 2
# a-il-des mails non lus ?
if not mail: i += 1
# on incrémente