From e646e19ab808ddcd600de4a23e87af87f3a081cc Mon Sep 17 00:00:00 2001 From: Daniel Swanson Date: Sat, 24 Jul 2021 08:27:48 -0500 Subject: [PATCH] still pass line numbers through to make debug output more readable --- apertium-regtest.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apertium-regtest.py b/apertium-regtest.py index 6294178..1e8385b 100755 --- a/apertium-regtest.py +++ b/apertium-regtest.py @@ -74,9 +74,12 @@ def load_output(fname): content = content_.strip() if not content: print('ERROR: Entry %s in %s was empty!' % (hsh, fname)) - ret[hsh] = [0, content] - # TODO: - # ret[hsh] = content + l = 0 + if line: + l = int(l[1:]) + ret[hsh] = [l, content] + # line numbers are nice for debugging, + # but nothing breaks if we don't have them return ret except FileNotFoundError: return {}