Il deviens rellement possible de restaurer une machine.
darcs-hash:20041017000657-41617-ed88d47e0c19687f955763b9cea7fd064f3e7929.gz
This commit is contained in:
parent
68b89098be
commit
87860c0543
1 changed files with 3 additions and 3 deletions
|
@ -62,7 +62,6 @@ def restore_adher(adh) :
|
||||||
adh._data['mail'] = []
|
adh._data['mail'] = []
|
||||||
all(adh)
|
all(adh)
|
||||||
|
|
||||||
|
|
||||||
def restore_machine(machine) :
|
def restore_machine(machine) :
|
||||||
try :
|
try :
|
||||||
obj.proprio # crash si l'adhérent est encore dans la base
|
obj.proprio # crash si l'adhérent est encore dans la base
|
||||||
|
@ -71,7 +70,7 @@ def restore_machine(machine) :
|
||||||
t = t.lower()
|
t = t.lower()
|
||||||
if t in 'ac' :
|
if t in 'ac' :
|
||||||
i = prompt("Entrez l'%sid auquel ratacher la machine : %sid =" % (t,t) )
|
i = prompt("Entrez l'%sid auquel ratacher la machine : %sid =" % (t,t) )
|
||||||
machine.dn = '%sid=%s,%s' % (t, i, machine.dn )
|
machine.dn = '%sid=%s,%s' % (t, i, machine.dn.split(',',1)[1] )
|
||||||
except :
|
except :
|
||||||
pass
|
pass
|
||||||
set_machine(machine)
|
set_machine(machine)
|
||||||
|
@ -83,7 +82,8 @@ def restore_club(club) :
|
||||||
q = prompt('Restaurer cette entrée ? [O/N]')
|
q = prompt('Restaurer cette entrée ? [O/N]')
|
||||||
if q not in 'oO' :
|
if q not in 'oO' :
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
obj.connect() # Reconnection à la base LDAP
|
||||||
if obj.idn == 'aid' :
|
if obj.idn == 'aid' :
|
||||||
restore_adher(obj)
|
restore_adher(obj)
|
||||||
elif obj.idn == 'mid' :
|
elif obj.idn == 'mid' :
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue