From 36bb2a25cb7c3e6727ce60715655e97a65e9eef7 Mon Sep 17 00:00:00 2001 From: Mauro Scomparin Date: Wed, 12 Apr 2017 19:06:02 +0200 Subject: [PATCH] Corretto importazione. --- utils/estrai.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/estrai.py b/utils/estrai.py index 27675c8..daf9195 100755 --- a/utils/estrai.py +++ b/utils/estrai.py @@ -4,13 +4,12 @@ dati = [] stato = 0 with open('dati.quif','r') as f: for l in f: - if stato == 0 and '!Type:Cash' in l: + if stato == 0 and l.startswith('D'): stato = 1 tr = { - 'head' : l + 'head' : l } dati.append(tr) - elif stato == 1 and l.startswith('D'): dati[-1]['data'] = l elif stato == 1 and l.startswith('M'): dati[-1]['descrizione'] = l -- 2.25.1