From 135d5d946b80af7c049321f0a6d2c33438d92766 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Fri, 8 Sep 2017 12:09:22 +0000 Subject: [PATCH] Tweaked the submission checker shell invocation code to deal with command lines starting with environment variable settings. - Legacy-Id: 14107 --- ietf/submit/checkers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ietf/submit/checkers.py b/ietf/submit/checkers.py index 07a13f2c5..152efafd2 100644 --- a/ietf/submit/checkers.py +++ b/ietf/submit/checkers.py @@ -202,7 +202,7 @@ class DraftYangChecker(object): text = file.readlines() # pyang cmd_template = settings.SUBMIT_PYANG_COMMAND - command = cmd_template.split()[0] + 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(libs=modpath, model=path) code, out, err = pipe(cmd) @@ -231,7 +231,7 @@ class DraftYangChecker(object): # yanglint if settings.SUBMIT_YANGLINT_COMMAND: cmd_template = settings.SUBMIT_YANGLINT_COMMAND - command = cmd_template.split()[0] + 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) code, out, err = pipe(cmd)