From 2163c18be638da07ee82ad352729e1af4e666e5b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 26 May 2023 23:02:33 -0400 Subject: utils: drop unused close_fds Nothing has ever changed this, and nothing probably will, so drop it. Bug: None Test: unittests Change-Id: I0e6478915e7613a1074c6a8455fad481476dc722 --- rh/utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rh/utils.py b/rh/utils.py index 14553a8..8820edb 100644 --- a/rh/utils.py +++ b/rh/utils.py @@ -248,8 +248,7 @@ class _Popen(subprocess.Popen): # pylint: disable=redefined-builtin def run(cmd, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, shell=False, env=None, extra_env=None, combine_stdout_stderr=False, - check=True, int_timeout=1, kill_timeout=1, capture_output=False, - close_fds=True): + check=True, int_timeout=1, kill_timeout=1, capture_output=False): """Runs a command. Args: @@ -275,7 +274,6 @@ def run(cmd, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, kill_timeout: If we're interrupted, how long (in seconds) should we give the invoked process to shutdown from a SIGTERM before we SIGKILL it. capture_output: Set |redirect_stdout| and |redirect_stderr| to True. - close_fds: Whether to close all fds before running |cmd|. Returns: A CompletedProcess object. @@ -364,7 +362,7 @@ def run(cmd, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, try: proc = _Popen(cmd, cwd=cwd, stdin=stdin, stdout=popen_stdout, stderr=popen_stderr, shell=False, env=env, - close_fds=close_fds) + close_fds=True) old_sigint = signal.getsignal(signal.SIGINT) handler = functools.partial(_kill_child_process, proc, int_timeout, -- cgit v1.2.3