[attributs] corrige blackliste

This commit is contained in:
Antoine Durand-Gasselin 2010-10-17 16:33:39 +02:00
parent 649a4e6691
commit 6f0e121045

View file

@ -400,15 +400,16 @@ class blacklist(Attr):
legend = u"Blackliste"
def parse_value(self, bl, ldif):
bl_debut, bl_fin, bl_comm = bl.split('$', 3)
bl_debut, bl_fin, bl_type, bl_comm = bl.split('$')
now = time.time()
self.value = { 'debut' : int (bl_debut),
'fin' : bl_fin if bl_fin == '-' else int(bl_fin),
'type' : bl_type
'comm' : bl_comm,
'actif' : int(bl_debut) < now and (bl_fin == '-' or int(bl_fin) > now) }
def __unicode__(self):
return u'$%(debut)s$%(fin)s$%(comm)s' % self.value
return u'$%(debut)s$%(fin)s$%(type)s$%(comm)s' % self.value
class historique(Attr):
singlevalue = False