On interdit les ponts rseau
darcs-hash:20041019171358-d1718-1ef041612904666f438fcb8bd4201dcd8bbbd940.gz
This commit is contained in:
parent
c07fc727c8
commit
c770fee0cc
1 changed files with 15 additions and 13 deletions
|
@ -894,19 +894,21 @@ def set_machine(machine) :
|
|||
|
||||
try : machine.mac(result[1])
|
||||
except ValueError, c :
|
||||
if len(c.args)>1 and isadm :
|
||||
# Mac en double
|
||||
arg = u'--title "Adresse MAC" '
|
||||
arg+= u'--yesno "L\'adresse MAC existe déja, continuer ? \n" 0 0'
|
||||
no, res = dialog(arg)
|
||||
if no :
|
||||
return set_machine(machine)
|
||||
else :
|
||||
try : machine.mac(result[1],1)
|
||||
except ValueError, c : err += c.args[0] + '\n'
|
||||
except EnvironmentError, c : err += c.args[0] + '\n'
|
||||
else :
|
||||
err += c.args[0] + '\n'
|
||||
if len(c.args)>1:
|
||||
if c.args[1] == 1 and isadm :
|
||||
# Mac en double
|
||||
arg = u'--title "Adresse MAC" '
|
||||
arg+= u'--yesno "L\'adresse MAC existe déja, continuer ? \n" 0 0'
|
||||
no, res = dialog(arg)
|
||||
if no :
|
||||
return set_machine(machine)
|
||||
else :
|
||||
try : machine.mac(result[1],1)
|
||||
except ValueError, c : err += c.args[0] + '\n'
|
||||
except EnvironmentError, c : err += c.args[0] + '\n'
|
||||
else:
|
||||
err += c.args[0] + '\n'
|
||||
|
||||
except EnvironmentError, c : err += c.args[0] + '\n'
|
||||
|
||||
try : machine.ip(result[2])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue