From c6dce36d7a58a7f2ec8d12c3c7a4bd67e566eeda Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Fri, 5 May 2023 20:38:22 -0700 Subject: [PATCH] fix fpscr table parser error reporting --- src/openpower/fpscr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openpower/fpscr.py b/src/openpower/fpscr.py index 98e5ed9e..3da88f16 100644 --- a/src/openpower/fpscr.py +++ b/src/openpower/fpscr.py @@ -129,12 +129,12 @@ def _parse_fields(): nonlocal lineno if err_lineno is None: err_lineno = lineno + line = lines[err_lineno] for i in range(10000): # 10000 is random limit if we can't read if linecache.getline(__file__, i).strip().startswith('"'): break err_lineno += 1 # lines before doc comment start - raise SyntaxError(msg, ( - __file__, err_lineno + 3, col, lines[err_lineno])) + raise SyntaxError(msg, (__file__, err_lineno, col, line)) for lineno, line in enumerate(lines): line_fields = _parse_line_fields(line) -- 2.30.2