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'] = []
|
||||
all(adh)
|
||||
|
||||
|
||||
def restore_machine(machine) :
|
||||
try :
|
||||
obj.proprio # crash si l'adhérent est encore dans la base
|
||||
|
@ -71,7 +70,7 @@ def restore_machine(machine) :
|
|||
t = t.lower()
|
||||
if t in 'ac' :
|
||||
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 :
|
||||
pass
|
||||
set_machine(machine)
|
||||
|
@ -83,7 +82,8 @@ def restore_club(club) :
|
|||
q = prompt('Restaurer cette entrée ? [O/N]')
|
||||
if q not in 'oO' :
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
obj.connect() # Reconnection à la base LDAP
|
||||
if obj.idn == 'aid' :
|
||||
restore_adher(obj)
|
||||
elif obj.idn == 'mid' :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue