From 6f0e1210454fd0c67f86089494dd7cadbc8c4fc5 Mon Sep 17 00:00:00 2001 From: Antoine Durand-Gasselin Date: Sun, 17 Oct 2010 16:33:39 +0200 Subject: [PATCH] [attributs] corrige blackliste --- attributs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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