diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2023-06-01 22:48:49 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-06-01 22:48:49 +0000 |
commit | 4ba994ee8a805ad9516a9d4d1ea8aebba6dc09e5 (patch) | |
tree | 59215d7da79729c429c0fef3e6d1c5deb007b5f3 | |
parent | 8d776d36ef707ab747fdbbc886049f2834361b76 (diff) | |
parent | 2163c18be638da07ee82ad352729e1af4e666e5b (diff) | |
download | repohooks-4ba994ee8a805ad9516a9d4d1ea8aebba6dc09e5.tar.gz |
Merge "utils: drop unused close_fds"
-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 a00b12b..86ff691 100644 --- a/rh/utils.py +++ b/rh/utils.py @@ -241,8 +241,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: @@ -268,7 +267,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. @@ -357,7 +355,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, |