From 02ec2aa7e373a4b6792dcd2cdafb7aef6445a518 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 1 Nov 2017 14:00:24 +0000 Subject: [PATCH] Included the path for draft moduled found invalid in the module paths when running yanglint, in order to avoid some unhelpful model not found messages. Fixes issue #2398. - Legacy-Id: 14266 --- ietf/settings.py | 2 +- ietf/submit/checkers.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ietf/settings.py b/ietf/settings.py index 94f53497e..80a583b6a 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -684,7 +684,7 @@ IDSUBMIT_STAGING_PATH = '/a/www/www6s/staging/' IDSUBMIT_STAGING_URL = '//www.ietf.org/staging/' IDSUBMIT_IDNITS_BINARY = '/a/www/ietf-datatracker/scripts/idnits' SUBMIT_PYANG_COMMAND = 'pyang --verbose --ietf -p {libs} {model}' -SUBMIT_YANGLINT_COMMAND = 'yanglint --verbose -p {rfclib} -p {draftlib} -p {tmplib} {model} -i' +SUBMIT_YANGLINT_COMMAND = 'yanglint --verbose -p {tmplib} -p {rfclib} -p {draftlib} -p {invallib} {model} -i' SUBMIT_YANGLINT_COMMAND = None # use the value above if you have yanglint installed SUBMIT_YANG_CATALOG_MODULEARG = "modules[]={module}" diff --git a/ietf/submit/checkers.py b/ietf/submit/checkers.py index 3caa66b5c..b4d20598b 100644 --- a/ietf/submit/checkers.py +++ b/ietf/submit/checkers.py @@ -226,7 +226,8 @@ class DraftYangChecker(object): cmd_template = settings.SUBMIT_YANGLINT_COMMAND command = [ w for w in cmd_template.split() if not '=' in w ][0] cmd_version = VersionInfo.objects.get(command=command).version - cmd = cmd_template.format(model=path, rfclib=settings.SUBMIT_YANG_RFC_MODEL_DIR, draftlib=settings.SUBMIT_YANG_DRAFT_MODEL_DIR, tmplib=workdir) + cmd = cmd_template.format(model=path, rfclib=settings.SUBMIT_YANG_RFC_MODEL_DIR, tmplib=workdir, + draftlib=settings.SUBMIT_YANG_DRAFT_MODEL_DIR, invallib=settings.SUBMIT_YANG_INVAL_MODEL_DIR, ) code, out, err = pipe(cmd) if code > 0 or len(err.strip()) > 0: error_lines = err.splitlines()