From 51cf3e70645c1a057d0e5313777c80ba7dca708b Mon Sep 17 00:00:00 2001 From: Ozbolt Menegatti Date: Sun, 16 Jun 2019 01:32:31 +0200 Subject: [PATCH] Improving debugging ouptut --- src/wani.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/wani.py b/src/wani.py index 1ba08c3..12ef8e8 100644 --- a/src/wani.py +++ b/src/wani.py @@ -33,14 +33,10 @@ def load_files(args): for n, fname in enumerate(filenames): et = load_xml(fname) yield from file_sentence_generator(et, skip_id_check, do_msd_translate, args.pc_tag, args.chunk_size) - if args.count_files: - status = " :: {} / {}".format(n, len(filenames)) - else: - status = "" - yield from file_sentence_generator(fname, skip_id_check, do_msd_translate, args.pc_tag, status) -def load_xml(filename, status): - logging.info("LOADING XML: {}{}".format(filename, status)) + +def load_xml(filename): + logging.info("\rLOADING XML: {}".format(filename)) with open(filename, 'r') as fp: content = fp.read()