Skip to content

Commit 8eded1d

Browse files
committed
Return a checker None result with exception message on xym exceptions.
- Legacy-Id: 13707
1 parent f6f0278 commit 8eded1d

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
@@ -136,6 +136,7 @@ def check_file_txt(self, path):
136136
message = ""
137137
results = []
138138
passed = True # Used by the submission tool. Yang checks always pass.
139+
model_list = []
139140

140141
extractor = xym.YangModuleExtractor(path, workdir, strict=True, strict_examples=False, debug_level=0)
141142
if not os.path.exists(path):
@@ -157,7 +158,9 @@ def check_file_txt(self, path):
157158
sys.stderr = saved_stderr
158159
model_list = extractor.get_extracted_models()
159160
except Exception as exc:
160-
log("Exception when running xym on %s: %s" % (name, exc))
161+
msg = "Exception when running xym on %s: %s" % (name, exc)
162+
log(msg)
163+
return None, msg, 0, 0, []
161164

162165
if not model_list:
163166
# Found no yang modules, don't deliver any YangChecker result

0 commit comments

Comments
 (0)