gestion: suggestion <automatique> si wifi ou chbre
This commit is contained in:
parent
9b17932814
commit
e79e5c0269
2 changed files with 6 additions and 12 deletions
|
@ -2676,18 +2676,11 @@ def menu_principal():
|
|||
try:
|
||||
if choix == 'Fixe':
|
||||
becane = MachineFixe(proprio)
|
||||
#Saisie prédictive de la mac
|
||||
try:
|
||||
prise = proprio.chbre().lower()[0] + becane.prise()
|
||||
becane.ip("<automatique>", lock=False)
|
||||
f = open('/usr/scripts/var/last_macs/' + prise, 'r')
|
||||
becane.mac(f.read(), lock=False)
|
||||
f.close()
|
||||
except:
|
||||
pass
|
||||
|
||||
elif choix == 'Wifi':
|
||||
becane = MachineWifi(proprio)
|
||||
# Suggestion: ne pas relever la mac
|
||||
if choix == 'Wifi' or (choix == 'Fixe' and proprio.chbre() not in ['', 'EXT']):
|
||||
becane.mac("<automatique>")
|
||||
except ValueError, c:
|
||||
arg = u'--title "Nouvelle machine" '
|
||||
arg += u'--msgbox "%s\n\n\n" 0 0' % to_unicode(c.args[0])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue