Nouvelles classes python MachineFixe, MachineWifi, MachineCrans et
BorneWifi. darcs-hash:20060311184809-68412-a73b80ed5a4ca9180d7d611b7a51a655f4107935.gz
This commit is contained in:
parent
4e248923f3
commit
a79c62fb96
2 changed files with 30 additions and 8 deletions
|
@ -28,7 +28,8 @@ import re
|
|||
|
||||
import affich_tools, config
|
||||
from lock import make_lock, remove_lock
|
||||
from ldap_crans import adherent, Machine, BorneWifi, crans_ldap, crans, club, blacklist_items, isadm, isdeconnecteur, ann_scol, droits_possibles, smtpserv, script_utilisateur
|
||||
from ldap_crans import adherent, crans_ldap, crans, club, blacklist_items, isadm, isdeconnecteur, ann_scol, droits_possibles, smtpserv, script_utilisateur
|
||||
from ldap_crans import Machine, MachineFixe, MachineWifi, MachineCrans, BorneWifi
|
||||
|
||||
def dialog(arg) :
|
||||
return affich_tools.dialog(u'Gestion des adhérents et machines du Crans',arg)
|
||||
|
@ -1828,13 +1829,13 @@ def menu_principal() :
|
|||
|
||||
elif choix=='aKM' :
|
||||
# Ajout machine au crans
|
||||
becane = Machine(crans(db.conn),"fixe")
|
||||
becane = MachineCrans(crans(db.conn))
|
||||
if set_machine(becane) :
|
||||
becane.restore()
|
||||
|
||||
elif choix=='aKB' :
|
||||
# Ajout borne wifi
|
||||
becane = BorneWifi(crans(db.conn),"borne")
|
||||
becane = BorneWifi(crans(db.conn))
|
||||
if set_machine(becane) :
|
||||
becane.restore()
|
||||
|
||||
|
@ -1901,9 +1902,9 @@ def menu_principal() :
|
|||
choix = 'Wifi'
|
||||
try :
|
||||
if choix=='Fixe' :
|
||||
becane = Machine(proprio, 'fixe')
|
||||
becane = MachineFixe(proprio)
|
||||
elif choix=='Wifi' :
|
||||
becane = Machine(proprio, 'wifi')
|
||||
becane = MachineWifi(proprio)
|
||||
except ValueError, c:
|
||||
arg = '--title "Nouvelle machine" '
|
||||
arg += '--msgbox "%s\n\n\n" 0 0' % c.args[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue