Skip to content

Commit 1e98a58

Browse files
committed
Added missing in-loop variable initializations in the yang checker code. Fixes issue ietf-tools#2397.
- Legacy-Id: 14268
1 parent 6e23f99 commit 1e98a58

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

ietf/submit/checkers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ def check_file_txt(self, path):
184184
for model in model_list:
185185
path = os.path.join(workdir, model)
186186
message = ""
187+
passed = 0
188+
errors = 0
189+
warnings = 0
190+
items = []
187191
modpath = ':'.join([
188192
workdir,
189193
settings.SUBMIT_YANG_RFC_MODEL_DIR,
@@ -199,7 +203,6 @@ def check_file_txt(self, path):
199203
cmd_version = VersionInfo.objects.get(command=command).version
200204
cmd = cmd_template.format(libs=modpath, model=path)
201205
code, out, err = pipe(cmd)
202-
items = []
203206
if code > 0 or len(err.strip()) > 0 :
204207
error_lines = err.splitlines()
205208
for line in error_lines:
@@ -264,6 +267,7 @@ def check_file_txt(self, path):
264267
"items": items,
265268
})
266269

270+
267271
shutil.rmtree(workdir)
268272

269273
passed = all( res["passed"] for res in results )

0 commit comments

Comments
 (0)