From 5f8c3ad3af6f9489f26ebe1926780f1b778bd46c Mon Sep 17 00:00:00 2001 From: bernat Date: Tue, 19 Oct 2004 19:16:57 +0200 Subject: [PATCH] Typo darcs-hash:20041019171657-d1718-063a48a144011cfaf1500d131fcbb95ae92b6a15.gz --- gestion/gest_crans.py | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/gestion/gest_crans.py b/gestion/gest_crans.py index 4eb96b63..d0382d86 100755 --- a/gestion/gest_crans.py +++ b/gestion/gest_crans.py @@ -894,20 +894,19 @@ def set_machine(machine) : try : machine.mac(result[1]) except ValueError, c : - 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' + if len(c.args)>1 and 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'