diff --git a/attributs.py b/attributs.py index 6ae6df5..8ac794a 100644 --- a/attributs.py +++ b/attributs.py @@ -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