fin_connexion: docstrings supp
This commit is contained in:
parent
c011293227
commit
5501a15cbf
1 changed files with 6 additions and 1 deletions
|
@ -57,6 +57,8 @@ FILTRE_TPL = u"""(&
|
|||
|
||||
|
||||
def warn(mail_conn, adh):
|
||||
"""Envoie un mail d'avertissement à ``adh``, en utilisant la connexion mail
|
||||
``mail_conn``"""
|
||||
fin = min(max(parse_gtf(v.value) for v in adh[l]) \
|
||||
for l in ['finConnexion', 'finAdhesion'] )
|
||||
delai = (fin - datetime.datetime.now(pytz.UTC)).days
|
||||
|
@ -79,6 +81,7 @@ def warn(mail_conn, adh):
|
|||
|
||||
|
||||
def compute_fin_connexion(adh):
|
||||
"""Renvoie le datetime de fin effective de connexion de l'``adh``"""
|
||||
return min( max(parse_gtf(v.value) for v in adh['fin' + l])
|
||||
for l in ['Adhesion', 'Connexion'])
|
||||
|
||||
|
@ -101,6 +104,8 @@ def select(conn, begin, to, mode='r'):
|
|||
return res
|
||||
|
||||
def brief(c, debut, fin):
|
||||
"""Renvoie la liste des adhérents dont la connexion expire entre
|
||||
debut et fin"""
|
||||
if not debut.tzinfo:
|
||||
debut = debut.replace(tzinfo=pytz.UTC)
|
||||
if not fin.tzinfo:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue