From 4e9eaa1b3f333f2b2f35f723bc01a82f1f151080 Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Thu, 7 Dec 2023 00:03:35 -0500 Subject: [PATCH] Use devnull --- auto_editor/utils/func.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auto_editor/utils/func.py b/auto_editor/utils/func.py index 6f3649e977..c3597602b9 100644 --- a/auto_editor/utils/func.py +++ b/auto_editor/utils/func.py @@ -111,9 +111,9 @@ def merge(start_list: np.ndarray, end_list: np.ndarray) -> BoolList: def get_stdout(cmd: list[str]) -> str: - from subprocess import PIPE, Popen + from subprocess import DEVNULL, PIPE, Popen - stdout, _ = Popen(cmd, stdout=PIPE, stderr=PIPE).communicate() + stdout, _ = Popen(cmd, stdin=DEVNULL, stdout=PIPE, stderr=PIPE).communicate() return stdout.decode("utf-8", "replace")