diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-11-14 15:56:18 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-11-14 16:07:11 +0300 |
commit | bee451612e60e89d2052570a54940d318799479d (patch) | |
tree | e3e1541484c2ae735ada46bb6695cb8b28e38211 /library | |
parent | 064f97271c584c977e7d790a3c5b0867f5a97b05 (diff) | |
download | ydb-bee451612e60e89d2052570a54940d318799479d.tar.gz |
Intermediate changes
commit_hash:bbe5982909469ab84284cb16547e69a096d992ea
Diffstat (limited to 'library')
-rw-r--r-- | library/python/testing/yatest_common/yatest/common/canonical.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/canonical.py b/library/python/testing/yatest_common/yatest/common/canonical.py index 8408e0f68f..57467b75d3 100644 --- a/library/python/testing/yatest_common/yatest/common/canonical.py +++ b/library/python/testing/yatest_common/yatest/common/canonical.py @@ -14,10 +14,11 @@ yatest_logger = logging.getLogger("ya.test") def _copy(src, dst, universal_lines=False): if universal_lines: - with open(dst, "wb") as f: + with open(dst, "wb") as f_dst: mode = "rbU" if six.PY2 else "rb" - for line in open(src, mode): - f.write(line) + with open(src, mode) as f_src: + for line in f_src: + f_dst.write(line) return shutil.copy(src, dst) |