Skip to content

Commit d6b8912

Browse files
josuahkartben
authored andcommitted
scripts: ci: check_compliance: ruff: avoid mixing stdout and stderr
The python subprocess call had a stdout=subprocess.PIPE parameter that redirects standard output to a pipe, and a stderr=subprocess.STDOUT parameter that redirected stderr to the pipe. This mixed JSON and non-JSON output together, and issued an exception. Fixing with stderr=subprocess.DEVNULL to ignore standard error and only keep the JSON output. Signed-off-by: Josuah Demangeon <[email protected]>
1 parent c6cf9b9 commit d6b8912

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/ci/check_compliance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ def run(self):
16571657
f"ruff check --force-exclude --output-format=json {file}",
16581658
check=True,
16591659
stdout=subprocess.PIPE,
1660-
stderr=subprocess.STDOUT,
1660+
stderr=subprocess.DEVNULL,
16611661
shell=True,
16621662
cwd=GIT_TOP,
16631663
)

0 commit comments

Comments
 (0)