commit e646e19ab808ddcd600de4a23e87af87f3a081cc Author: Daniel Swanson Date: Sat Jul 24 08:27:48 2021 -0500 still pass line numbers through to make debug output more readable 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 {}