diff options
author | v-korovin <v-korovin@yandex-team.com> | 2023-05-04 13:59:48 +0300 |
---|---|---|
committer | v-korovin <v-korovin@yandex-team.com> | 2023-05-04 13:59:48 +0300 |
commit | 69ceb35cb906509492a4b265c9872ae464c18952 (patch) | |
tree | 40cafff5c96000d60639e44569a1fe4475b04d2f | |
parent | 468c68fdef6b0a19e4e9f4a25d304f19186664fa (diff) | |
download | ydb-69ceb35cb906509492a4b265c9872ae464c18952.tar.gz |
Set Popen(text=True) for py3 just for fun
-rw-r--r-- | library/python/testing/yatest_common/yatest/common/process.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/process.py b/library/python/testing/yatest_common/yatest/common/process.py index 5e8d0342c3..156c788359 100644 --- a/library/python/testing/yatest_common/yatest/common/process.py +++ b/library/python/testing/yatest_common/yatest/common/process.py @@ -537,6 +537,10 @@ def execute( if popen_kwargs is None: popen_kwargs = {} + if 'text' not in popen_kwargs and six.PY3: + # Return str for python3 if it not setted + popen_kwargs['text'] = True + # if subprocess.PIPE in [stdout, stderr]: # raise ValueError("Don't use pipe to obtain stream data - it may leads to the deadlock") |