On ne sanctionne pas pendant les tests

darcs-hash:20060302115408-6d78a-4a107669e3ce53c93ed2eff25bd139c9c6a03c5f.gz
This commit is contained in:
pessoles 2006-03-02 12:54:08 +01:00
parent 7e84e331ef
commit ba691115bc

View file

@ -157,7 +157,7 @@ avertis_soft = curseur.fetchall()
################ ################
for elupload, eltype, elid in uploadeurs: for elupload, eltype, elid in uploadeurs:
if elupload >= upload.hard : if elupload >= upload.hard:
# L'adhérent a t il été blacklisté ? # L'adhérent a t il été blacklisté ?
#################################### ####################################
if [eltype,elid] in avertis_hard: if [eltype,elid] in avertis_hard:
@ -226,6 +226,8 @@ for elupload, eltype, elid in uploadeurs:
historique = [ '%s & %s & Mo'%(bl[0],bl[1]) for bl in historique ] # tranformation en ligne historique = [ '%s & %s & Mo'%(bl[0],bl[1]) for bl in historique ] # tranformation en ligne
historique = '\\\\\n'.join(historique) # assemblage des lignes historique = '\\\\\n'.join(historique) # assemblage des lignes
template = template.replace('~historique~', historique) template = template.replace('~historique~', historique)
template = template.replace('~limitehard~', str(upload.hard))
template = template.replace('~nbadher~', str(len(ldap.search('paiement=ok')['adherent'])))
file(dossier+fichier+'.tex','w').write(template) file(dossier+fichier+'.tex','w').write(template)
@ -458,13 +460,13 @@ for ip, id_p2p, nombre in fraudeurs :
if index : if index :
# adhérent déja blacklisté # adhérent déja blacklisté
fin = localtime(time()+60*60*24) fin = localtime(time()+60*60*24)
proprio.blacklist(( index[0] , ['now',"%d/%d/%d %d:%d" % (fin[2],fin[1],fin[0],fin[3],fin[4]),'p2p',hostname] )) #proprio.blacklist(( index[0] , ['now',"%d/%d/%d %d:%d" % (fin[2],fin[1],fin[0],fin[3],fin[4]),'p2p',hostname] ))
proprio.save() #proprio.save()
else : else :
# adhérent non blacklisté # adhérent non blacklisté
fin = localtime(time()+60*60*24) fin = localtime(time()+60*60*24)
proprio.blacklist(['now',"%d/%d/%d %d:%d" % (fin[2],fin[1],fin[0],fin[3],fin[4]),'p2p',hostname]) #proprio.blacklist(['now',"%d/%d/%d %d:%d" % (fin[2],fin[1],fin[0],fin[3],fin[4]),'p2p',hostname])
proprio.save() #proprio.save()