n'affiche le disclaimer qu'une fois
This commit is contained in:
parent
95f785be7c
commit
b0e7c1c66e
1 changed files with 11 additions and 15 deletions
26
dump.py
26
dump.py
|
@ -37,6 +37,10 @@ def print_carac(text, value):
|
||||||
|
|
||||||
|
|
||||||
def show_entry(entry):
|
def show_entry(entry):
|
||||||
|
# Si le champ fid est présent, c'est une facture, on utilise une fonction
|
||||||
|
# annexe
|
||||||
|
if 'fid' in entry.keys():
|
||||||
|
show_facture(entry)
|
||||||
printer.justify('C')
|
printer.justify('C')
|
||||||
printer.underlineOn()
|
printer.underlineOn()
|
||||||
if 'host' in entry:
|
if 'host' in entry:
|
||||||
|
@ -154,22 +158,14 @@ def print_liste(liste):
|
||||||
printer.setDefault() # Restore printer to defaults
|
printer.setDefault() # Restore printer to defaults
|
||||||
printer.printImage(crans_logo, True)
|
printer.printImage(crans_logo, True)
|
||||||
|
|
||||||
first = True
|
for entry in liste:
|
||||||
|
show_entry(entry)
|
||||||
|
|
||||||
for m in liste:
|
if any('secret' in entry or 'pass' in entry for entry in liste):
|
||||||
#if not first:
|
printer.println(u'Veuillez conserver ces'.encode(CODING))
|
||||||
# print_carac('','')
|
printer.println(u'informations en lieu sûr.'.encode(CODING))
|
||||||
first = False
|
printer.println(u' '.encode(CODING))
|
||||||
|
printer.println(u' '.encode(CODING))
|
||||||
if 'fid' in m.keys():
|
|
||||||
show_facture(m) # Si le champ fid est présent, c'est une facture -> on utilise la fonction adaptée
|
|
||||||
else:
|
|
||||||
show_entry(m)
|
|
||||||
|
|
||||||
printer.println(u'Veuillez conserver ces'.encode(CODING))
|
|
||||||
printer.println(u'informations en lieu sûr.'.encode(CODING))
|
|
||||||
printer.println(u' '.encode(CODING))
|
|
||||||
printer.println(u' '.encode(CODING))
|
|
||||||
|
|
||||||
printer.feed(2)
|
printer.feed(2)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue