chambres_vides: dé-harde les homes
This commit is contained in:
parent
6e8991239b
commit
e0ee29e139
2 changed files with 4 additions and 3 deletions
|
@ -2407,6 +2407,7 @@ class Adherent(BaseProprietaire):
|
||||||
if mailexist(login):
|
if mailexist(login):
|
||||||
raise ValueError(u"Login existant ou correspondant à un alias mail.", 1)
|
raise ValueError(u"Login existant ou correspondant à un alias mail.", 1)
|
||||||
|
|
||||||
|
# <!> b2moo: à fixer pour les homes
|
||||||
home = '/home/' + login
|
home = '/home/' + login
|
||||||
if os.path.exists(home):
|
if os.path.exists(home):
|
||||||
raise ValueError(u'Création du compte impossible : home existant', 1)
|
raise ValueError(u'Création du compte impossible : home existant', 1)
|
||||||
|
|
|
@ -204,7 +204,7 @@ comptes_inactifs.py
|
||||||
date = strftime(u'%d/%m/%Y %H:%M', localtime(date))
|
date = strftime(u'%d/%m/%Y %H:%M', localtime(date))
|
||||||
else:
|
else:
|
||||||
date = u'Jamais'
|
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 = nb_mails_non_lus(login)
|
||||||
mail = mail == None and u'?' or mail > 0 and u'X' or u' '
|
mail = mail == None and u'?' or mail > 0 and u'X' or u' '
|
||||||
ligne = (a.id(), login, a.Nom(), date, forward, mail)
|
ligne = (a.id(), login, a.Nom(), date, forward, mail)
|
||||||
|
@ -234,7 +234,7 @@ comptes_inactifs.py
|
||||||
(doit être exécuté en tant que root).
|
(doit être exécuté en tant que root).
|
||||||
"""
|
"""
|
||||||
# Nombre de personnes concernées, en expansant de droite à gauche :
|
# 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
|
# Voir aussi template_path
|
||||||
stats = [0, 0, 0, 0, 0, 0, 0, 0]
|
stats = [0, 0, 0, 0, 0, 0, 0, 0]
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ comptes_inactifs.py
|
||||||
# est-ce un membre inscrit ?
|
# est-ce un membre inscrit ?
|
||||||
if ann_scol not in a.paiement(): i += 4
|
if ann_scol not in a.paiement(): i += 4
|
||||||
# a-t-il un .forward ?
|
# 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 ?
|
# a-il-des mails non lus ?
|
||||||
if not mail: i += 1
|
if not mail: i += 1
|
||||||
# on incrémente
|
# on incrémente
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue