diff options
author | shadchin <shadchin@yandex-team.com> | 2022-12-18 19:41:29 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.com> | 2022-12-18 19:41:29 +0300 |
commit | 2805ea37cb7c4f7daa09550cdc8de801ad4c0ced (patch) | |
tree | 87061356e721368cd97fcc5165b4255a7220b085 | |
parent | 90ddaa030f7c2e10a7f9ee7ef47fabdcec738ffb (diff) | |
download | ydb-2805ea37cb7c4f7daa09550cdc8de801ad4c0ced.tar.gz |
Fix yatest with Python 3.11
-rw-r--r-- | library/python/testing/yatest_common/yatest/common/canonical.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/canonical.py b/library/python/testing/yatest_common/yatest/common/canonical.py index 6e61e6485a..e8bc893484 100644 --- a/library/python/testing/yatest_common/yatest/common/canonical.py +++ b/library/python/testing/yatest_common/yatest/common/canonical.py @@ -15,7 +15,8 @@ yatest_logger = logging.getLogger("ya.test") def _copy(src, dst, universal_lines=False): if universal_lines: with open(dst, "wb") as f: - for line in open(src, "rbU"): + mode = "rbU" if six.PY2 else "rb" + for line in open(src, mode): f.write(line) return shutil.copy(src, dst) |