Classe BorneWifi.
darcs-hash:20060302155728-68412-e2be9bb3a445573dbb34adddfe21be33ca96de96.gz
This commit is contained in:
parent
32d2199d4b
commit
be3d9b49b0
3 changed files with 150 additions and 129 deletions
|
@ -28,7 +28,7 @@ import re
|
|||
|
||||
import affich_tools, config
|
||||
from lock import make_lock, remove_lock
|
||||
from ldap_crans import adherent, machine, crans_ldap, crans, club, blacklist_items, isadm, isdeconnecteur, ann_scol, droits_possibles, smtpserv, script_utilisateur
|
||||
from ldap_crans import adherent, Machine, BorneWifi, crans_ldap, crans, club, blacklist_items, isadm, isdeconnecteur, ann_scol, droits_possibles, smtpserv, script_utilisateur
|
||||
|
||||
def dialog(arg) :
|
||||
return affich_tools.dialog(u'Gestion des adhérents et machines du Crans',arg)
|
||||
|
@ -1178,7 +1178,7 @@ def set_machine(machine) :
|
|||
arg+= u'"PortsTCP machine->ext :" 5 1 "%s" 5 25 50 0 ' % machine.portTCPout()
|
||||
arg+= u'"PortsUDP ext->machine :" 6 1 "%s" 6 25 50 0 ' % machine.portUDPin()
|
||||
arg+= u'"PortsUDP machine->ext :" 7 1 "%s" 7 25 50 0 ' % machine.portUDPout()
|
||||
if machine.puissance()!=None and isadm :
|
||||
if isinstance(machine, BorneWifi) and isadm :
|
||||
# Borne wifi
|
||||
p = u'Mettre le lieu de la borne comme première remarque.'
|
||||
arg+= u'"Canaux :" 2 35 "%s" 2 43 14 0 ' % machine.canal(None,False)
|
||||
|
@ -1230,7 +1230,7 @@ def set_machine(machine) :
|
|||
machine.portUDPout(result[6])
|
||||
except ValueError, c : err += c.args[0] + '\n'
|
||||
|
||||
if isadm and machine.puissance()!=None :
|
||||
if isadm and isinstance(machine, BorneWifi):
|
||||
try : machine.canal(result[7])
|
||||
except ValueError, c : err += c.args[0] + '\n'
|
||||
try : machine.puissance(result[8])
|
||||
|
@ -1828,13 +1828,13 @@ def menu_principal() :
|
|||
|
||||
elif choix=='aKM' :
|
||||
# Ajout machine au crans
|
||||
becane = machine(crans(),"fixe")
|
||||
becane = Machine(crans(),"fixe")
|
||||
if set_machine(becane) :
|
||||
becane.restore()
|
||||
|
||||
elif choix=='aKB' :
|
||||
# Ajout borne wifi
|
||||
becane = machine(crans(),"borne")
|
||||
becane = BorneWifi(crans(),"borne")
|
||||
if set_machine(becane) :
|
||||
becane.restore()
|
||||
|
||||
|
@ -1901,9 +1901,9 @@ def menu_principal() :
|
|||
choix = 'Wifi'
|
||||
try :
|
||||
if choix=='Fixe' :
|
||||
becane = machine(proprio,'fixe')
|
||||
becane = Machine(proprio, 'fixe')
|
||||
elif choix=='Wifi' :
|
||||
becane = machine(proprio,'wifi')
|
||||
becane = Machine(proprio, 'wifi')
|
||||
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