login->host (pour machines)

This commit is contained in:
Daniel STAN 2014-08-31 16:54:46 +02:00
parent d627da4e47
commit 0987d2be0a
2 changed files with 8 additions and 5 deletions

View file

@ -13,7 +13,7 @@ import json
CODING='cp437'
DEVICE="/dev/ttyUSB0"
SAMPLE_MACHINE = {
'login': 'nouille',
'host': 'nouille',
'macAddress': '<automatique>',
'secret': '**********',
}
@ -38,7 +38,7 @@ def print_carac(text, value):
def show_entry(entry):
printer.justify('C')
printer.underlineOn()
if 'secret' in entry:
if 'host' in entry:
title = u'Détails machine'
if 'type' in entry:
title += u' ' + entry['type']
@ -48,6 +48,7 @@ def show_entry(entry):
printer.underlineOff()
printer.justify('L')
login = entry.get('login', None) or entry['host']
print_carac('Login', entry['login'])
if 'macAddress' in entry:
print_carac('Mac', entry['macAddress'])