aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/testing/yatest_common/yatest
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:39 +0300
commita6a92afe03e02795227d2641b49819b687f088f8 (patch)
treef6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /library/python/testing/yatest_common/yatest
parentc6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff)
downloadydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/python/testing/yatest_common/yatest')
-rw-r--r--library/python/testing/yatest_common/yatest/common/process.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/process.py b/library/python/testing/yatest_common/yatest/common/process.py
index a8bcc21f51..d252538d13 100644
--- a/library/python/testing/yatest_common/yatest/common/process.py
+++ b/library/python/testing/yatest_common/yatest/common/process.py
@@ -468,23 +468,23 @@ def execute(
# if subprocess.PIPE in [stdout, stderr]:
# raise ValueError("Don't use pipe to obtain stream data - it may leads to the deadlock")
- def get_out_stream(stream, default_name):
- if stream is None:
- # No stream is supplied: open new temp file
+ def get_out_stream(stream, default_name):
+ if stream is None:
+ # No stream is supplied: open new temp file
return _get_command_output_file(command, default_name), False
-
+
if isinstance(stream, six.string_types):
- # User filename is supplied: open file for writing
+ # User filename is supplied: open file for writing
return open(stream, 'wb+'), stream.startswith('/dev/')
-
- # Open file or PIPE sentinel is supplied
- is_pipe = stream == subprocess.PIPE
- return stream, not is_pipe
-
+
+ # Open file or PIPE sentinel is supplied
+ is_pipe = stream == subprocess.PIPE
+ return stream, not is_pipe
+
# to be able to have stdout/stderr and track the process time execution, we don't use subprocess.PIPE,
# as it can cause processes hangs, but use tempfiles instead
- out_file, user_stdout = get_out_stream(stdout, 'out')
- err_file, user_stderr = get_out_stream(stderr, 'err')
+ out_file, user_stdout = get_out_stream(stdout, 'out')
+ err_file, user_stderr = get_out_stream(stderr, 'err')
in_file = stdin
if shell and type(command) == list: