diff options
author | Mike Frysinger <vapier@google.com> | 2023-05-26 23:02:33 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2023-05-26 23:06:24 -0400 |
commit | 2163c18be638da07ee82ad352729e1af4e666e5b (patch) | |
tree | f370d7cab558d847474ae7ae255697464ac2a979 | |
parent | 958d01176166cce29564cc3a2ef1e03db8159827 (diff) | |
download | repohooks-2163c18be638da07ee82ad352729e1af4e666e5b.tar.gz |
utils: drop unused close_fds
Nothing has ever changed this, and nothing probably will, so drop it.
Bug: None
Test: unittests
Change-Id: I0e6478915e7613a1074c6a8455fad481476dc722
-rw-r--r-- | rh/utils.py | 6 |
1 files 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, |