From aa5b3920f49f0b8cfa162618d5f5b68c01404be9 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 6 May 2023 10:07:28 +0100 Subject: [PATCH] add comment about why the new check has been added --- src/openpower/decoder/power_fields.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openpower/decoder/power_fields.py b/src/openpower/decoder/power_fields.py index 892af1d8..bb6a8efb 100644 --- a/src/openpower/decoder/power_fields.py +++ b/src/openpower/decoder/power_fields.py @@ -501,16 +501,16 @@ class DecodeFields: form.append(l) if len(form) <= 1: continue + # check separators line up with header for i, ch in enumerate(l): if ch != '|': continue if i >= len(form[0]) or form[0][i] != '|': col = len(txt[lineno]) - len(txt[lineno].lstrip()) col += i + 1 - raise SyntaxError( - "form line field separator ('|') " - "with no corresponding separator in header", - (self.fname, lineno + 1, col, txt[lineno])) + raise SyntaxError("form line field separator ('|') " + "with no corresponding separator in header", + (self.fname, lineno + 1, col, txt[lineno])) if not reading_data: assert l[0] == '#' heading = l[1:].strip() -- 2.30.2