diff --git a/gestion/numeros_disponibles.py b/gestion/numeros_disponibles.py index 0bf6a185..0c8bbe92 100755 --- a/gestion/numeros_disponibles.py +++ b/gestion/numeros_disponibles.py @@ -62,12 +62,7 @@ def update_ip(plage, occupees): break pool_ip.append(ip) - resultat = '' - - for ip in pool_ip: - if ip not in occupees : - if not AddrInNet(ip, ancien_vlan_adm): - resultat += '%s\n' % ip + resultat = ''.join('%s\n' % ip for ip in pool_ip if ip not in occupees and not AddrInNet(ip, ancien_vlan_adm)) f = open(repertoire + 'ip_' + plage,'w') f.write(resultat)