Expliciation de quelle blackliste st modifie dans les historiques.

darcs-hash:20041017000757-41617-66812edaa9336fe93577a07e3e5242dd3a11daeb.gz
This commit is contained in:
pauget 2004-10-17 02:07:57 +02:00
parent 87860c0543
commit 6b0be7b838

View file

@ -685,16 +685,18 @@ class base_classes_crans(crans_ldap) :
try : time.strptime(new[1],date_format)
except : raise ValueError(u'Date de fin blacklist invalide')
new = ','.join(new)
new = preattr(new)[1]
new_c = ','.join(new)
new_c = preattr(new_c)[1]
if index!=-1 :
liste[index] = new
liste[index] = new_c
else :
liste = liste + [ new ]
liste = liste + [ new_c ]
self._set('blacklist',liste)
if self._data['blacklist'] != liste :
self._data['blacklist']=liste
self.modifs.append('blacklist_' + new[2])
return liste
def restore(self) :
@ -838,12 +840,11 @@ class base_classes_crans(crans_ldap) :
'hostAlias' : [ 'dns' ] ,
'droits' : [ 'droits' ] ,
'ports' : [ 'firewall-komaz' ] ,
'blacklist' : [ 'blacklistes' ] ,
}
serv = []
for m in self.modifs :
for s in annuaire_modif_service.get(m,[]) :
for s in annuaire_modif_service.get(m,[m]) :
if s not in serv :
serv.append(s)