Suppression du doublon pour les IP (dans le cas o on change l'adresse MAC)
darcs-hash:20041220112900-d1718-a82aa7ee8da9c3491de7deda46f9a8acb0cfb0de.gz
This commit is contained in:
parent
1f69217a4b
commit
fcc46e0a53
1 changed files with 4 additions and 4 deletions
|
@ -387,7 +387,7 @@ class crans_ldap :
|
|||
def tr(arg) :
|
||||
return preattr(arg)[1]
|
||||
args=map(tr,args)
|
||||
|
||||
|
||||
if new in serv.keys() :
|
||||
new_args = []
|
||||
for arg in args :
|
||||
|
@ -410,9 +410,6 @@ class crans_ldap :
|
|||
except ldap.ALREADY_EXISTS :
|
||||
# Existe déja => rien à faire
|
||||
pass
|
||||
except ldap.TYPE_OR_VALUE_EXISTS :
|
||||
# Pareil
|
||||
pass
|
||||
|
||||
def search(self,expression,mode='') :
|
||||
"""
|
||||
|
@ -2047,6 +2044,9 @@ class machine(base_classes_crans) :
|
|||
reconf_ip += self._data.get('ipHostNumber',[])
|
||||
else :
|
||||
reconf_ip = []
|
||||
|
||||
# On vire les doublons dans reconf_ip
|
||||
reconf_ip = list(dict(zip(reconf_ip,[None]*len(reconf_ip))))
|
||||
|
||||
# Enregistrement
|
||||
self._save()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue