Added another guard against varying pyang output format.
- Legacy-Id: 10966
This commit is contained in:
parent
f52e21fb17
commit
7b65e2624f
|
@ -142,6 +142,8 @@ class DraftYangChecker(object):
|
|||
if code > 0:
|
||||
error_lines = err.splitlines()
|
||||
for line in error_lines:
|
||||
if line.strip():
|
||||
try:
|
||||
fn, lnum, msg = line.split(':', 2)
|
||||
lnum = int(lnum)
|
||||
if fn == model and (lnum-1) in range(len(text)):
|
||||
|
@ -153,6 +155,8 @@ class DraftYangChecker(object):
|
|||
errors += 1
|
||||
if 'warning: ' in msg:
|
||||
warnings += 1
|
||||
except ValueError:
|
||||
pass
|
||||
results[model] = {
|
||||
"passed": code == 0,
|
||||
"message": out+"No validation errors\n" if code == 0 else err,
|
||||
|
|
Loading…
Reference in a new issue