File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,17 +142,21 @@ def check_file_txt(self, path):
142142 if code > 0 :
143143 error_lines = err .splitlines ()
144144 for line in error_lines :
145- fn , lnum , msg = line .split (':' , 2 )
146- lnum = int (lnum )
147- if fn == model and (lnum - 1 ) in range (len (text )):
148- line = text [lnum - 1 ].rstrip ()
149- else :
150- line = None
151- items .append ((lnum , line , msg ))
152- if 'error: ' in msg :
153- errors += 1
154- if 'warning: ' in msg :
155- warnings += 1
145+ if line .strip ():
146+ try :
147+ fn , lnum , msg = line .split (':' , 2 )
148+ lnum = int (lnum )
149+ if fn == model and (lnum - 1 ) in range (len (text )):
150+ line = text [lnum - 1 ].rstrip ()
151+ else :
152+ line = None
153+ items .append ((lnum , line , msg ))
154+ if 'error: ' in msg :
155+ errors += 1
156+ if 'warning: ' in msg :
157+ warnings += 1
158+ except ValueError :
159+ pass
156160 results [model ] = {
157161 "passed" : code == 0 ,
158162 "message" : out + "No validation errors\n " if code == 0 else err ,
You can’t perform that action at this time.
0 commit comments