[ldap_crans/gest_crans] Ajout d'une fonction de log, et interversion de l'affectation d'une ip, et des tests sur la mac, sinon l'ipv6 ça juste marche pas

This commit is contained in:
Pierre-Elliott Bécue 2013-02-22 19:31:54 +01:00
parent 5406f3fcd4
commit 559583654b
2 changed files with 11 additions and 6 deletions

View file

@ -1501,6 +1501,10 @@ def set_machine(machine):
except ValueError, c: err += c.args[0] + '\n'
except EnvironmentError, c: err += c.args[0] + '\n'
try: machine.ip(result[2])
except ValueError, c: err += c.args[0] + '\n'
except EnvironmentError, c: err += c.__str__() + '\n'
except RuntimeError, c: err += c.args[0] + '\n' # Plus d'IP libres, peut-être à traiter differement ?
try: machine.mac(result[1])
except ValueError, c:
if len(c.args)>1 and c.args[1] == 1 and isadm:
@ -1529,10 +1533,6 @@ def set_machine(machine):
err += c.args[0] + '\n'
except EnvironmentError, c: err += c.args[0] + '\n'
try: machine.ip(result[2])
except ValueError, c: err += c.args[0] + '\n'
except EnvironmentError, c: err += c.__str__() + '\n'
except RuntimeError, c: err += c.args[0] + '\n' # Plus d'IP libres, peut-être à traiter differement ?
if isadm:
try: