Skip to content

Commit 135d5d9

Browse files
committed
Tweaked the submission checker shell invocation code to deal with command lines starting with environment variable settings.
- Legacy-Id: 14107
1 parent a9b259e commit 135d5d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/submit/checkers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def check_file_txt(self, path):
202202
text = file.readlines()
203203
# pyang
204204
cmd_template = settings.SUBMIT_PYANG_COMMAND
205-
command = cmd_template.split()[0]
205+
command = [ w for w in cmd_template.split() if not '=' in w ][0]
206206
cmd_version = VersionInfo.objects.get(command=command).version
207207
cmd = cmd_template.format(libs=modpath, model=path)
208208
code, out, err = pipe(cmd)
@@ -231,7 +231,7 @@ def check_file_txt(self, path):
231231
# yanglint
232232
if settings.SUBMIT_YANGLINT_COMMAND:
233233
cmd_template = settings.SUBMIT_YANGLINT_COMMAND
234-
command = cmd_template.split()[0]
234+
command = [ w for w in cmd_template.split() if not '=' in w ][0]
235235
cmd_version = VersionInfo.objects.get(command=command).version
236236
cmd = cmd_template.format(model=path, rfclib=settings.SUBMIT_YANG_RFC_MODEL_DIR, draftlib=settings.SUBMIT_YANG_DRAFT_MODEL_DIR, tmplib=workdir)
237237
code, out, err = pipe(cmd)

0 commit comments

Comments
 (0)