summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTing-Han Hou <ue081723@gmail.com>2026-10-10 01:58:32 +0800
committerNathan Chancellor <nathan@kernel.org>2026-10-09 22:39:52 +0200
commitd26ab84593e63bc5395ed9b518502830fda3367c (patch)
tree8782193e4817515c08b8cfc49218934d95dd63d7 /scripts
parenta8f72a75b38a153d32a59b2ebca1d7079db1dd1a (diff)
clang-tools: Import os for broken pipe handling
The BrokenPipeError handler in run-clang-tools.py calls os.open() and os.dup2() without importing os. If this handler is reached, it raises NameError instead of redirecting stdout and exiting with status 1. Import os so the handler can work as intended. Fixes: 87c7ee67deb7 ("scripts: handle BrokenPipeError for python scripts") Assisted-by: LLM Signed-off-by: Ting-Han Hou <ue081723@gmail.com> Link: https://patch.msgid.link/20261009175836.2277-1-ue081723@gmail.com Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/clang-tools/run-clang-tools.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/clang-tools/run-clang-tools.py b/scripts/clang-tools/run-clang-tools.py
index e78be82aa693..79d58b34e7ac 100755
--- a/scripts/clang-tools/run-clang-tools.py
+++ b/scripts/clang-tools/run-clang-tools.py
@@ -12,6 +12,7 @@ compile_commands.json.
import argparse
import json
import multiprocessing
+import os
import subprocess
import sys