Skip to content

Commit e0d1c0b

Browse files
committed
Fixed a possible index error in the yang validator checker plugin.
- Legacy-Id: 10952
1 parent 75a3895 commit e0d1c0b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ietf/submit/checkers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ def check_file_txt(self, path):
140140
for line in error_lines:
141141
fn, lnum, msg = line.split(':', 2)
142142
lnum = int(lnum)
143-
line = text[lnum-1].rstrip()
143+
if fn == model and (lnum-1) in range(len(text)):
144+
line = text[lnum-1].rstrip()
145+
else:
146+
line = None
144147
items.append((lnum, line, msg))
145148
if 'error: ' in msg:
146149
errors += 1

0 commit comments

Comments
 (0)