[ldap_crans.py] Maj aussi de la blackliste editee
Ignore-this: 3d1e0731c01c8ff657609d0224294cdb Sinon il ne met dans services_to_restart que la nouvelle blackliste darcs-hash:20110903140118-ddb99-a84afa6fcb675ffa36d5470893a3ef9dae04d46f.gz
This commit is contained in:
parent
6b0061bf91
commit
f2b46b1d87
1 changed files with 7 additions and 1 deletions
|
@ -1048,7 +1048,6 @@ class BaseClasseCrans(CransLdap):
|
|||
liste.append(new_c)
|
||||
|
||||
if liste != self._data['blacklist']:
|
||||
self._data['blacklist'] = liste
|
||||
self.modifs.setdefault('blacklist_' + new[2], None)
|
||||
if not hasattr(self, "_blacklist_restart"):
|
||||
self._blacklist_restart = {}
|
||||
|
@ -1057,6 +1056,13 @@ class BaseClasseCrans(CransLdap):
|
|||
restart.append(debut)
|
||||
if fin != -1 and fin not in restart:
|
||||
restart.append(fin)
|
||||
# Si on édite une ancienne blackliste, on met aussi cette bl à jour
|
||||
if index != -1:
|
||||
old_restart = self._blacklist_restart.setdefault(self._data['blacklist'][index].split('$')[2], [])
|
||||
now = int(time.time())
|
||||
if now not in old_restart:
|
||||
old_restart.append(now)
|
||||
self._data['blacklist'] = liste
|
||||
|
||||
return liste
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue