aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/lldbtest.py
diff options
context:
space:
mode:
authorNicolas van Kempen <nvankemp@gmail.com>2024-08-30 14:26:49 -0400
committerGitHub <noreply@github.com>2024-08-30 19:26:49 +0100
commitc49770c60f26e449379447109f7d915bd8de0384 (patch)
tree6ccadd331d1da78ee85c0f11f12a47b6a3187035 /lldb/packages/Python/lldbsuite/test/lldbtest.py
parent07178981246c56e8beafe7fe49f0f442436f08c4 (diff)
downloadllvm-c49770c60f26e449379447109f7d915bd8de0384.zip
llvm-c49770c60f26e449379447109f7d915bd8de0384.tar.gz
llvm-c49770c60f26e449379447109f7d915bd8de0384.tar.bz2
[NFC] Prefer subprocess.DEVNULL over os.devnull (#106500)
There is no need to support Python 2.7 anymore, Python 3.3+ has `subprocess.DEVNULL`. This is good practice and also prevents file handles from staying open unnecessarily. Also remove a couple unused or unneeded `__future__` imports.
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index b57c3bd..e0da7cb 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -31,7 +31,6 @@ $
import abc
from functools import wraps
import gc
-import glob
import io
import json
import os.path
@@ -416,7 +415,7 @@ class _LocalProcess(_BaseProcess):
self._proc = Popen(
[executable] + args,
- stdout=open(os.devnull) if not self._trace_on else None,
+ stdout=DEVNULL if not self._trace_on else None,
stdin=PIPE,
env=env,
)