diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-03-08 06:48:39 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-03-08 06:59:57 +0300 |
commit | 9cf3699e784fcc4323a7d4deb34c33d6bf917031 (patch) | |
tree | 197b2c81d7e3ce1485917a9a48c4c5df854481c4 /yt | |
parent | 7c1f60188c1081eafec304ac8ca36dcbfd5b8f93 (diff) | |
download | ydb-9cf3699e784fcc4323a7d4deb34c33d6bf917031.tar.gz |
Intermediate changes
Diffstat (limited to 'yt')
-rw-r--r-- | yt/python/yt/yson/__init__.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/yt/python/yt/yson/__init__.py b/yt/python/yt/yson/__init__.py index 8fa64bd180..c20ae5ea52 100644 --- a/yt/python/yt/yson/__init__.py +++ b/yt/python/yt/yson/__init__.py @@ -42,7 +42,7 @@ TYPE = None HAS_PARQUET = False try: - from yt_yson_bindings import load, loads, dump, dumps # noqa + from yt_yson_bindings import load, loads, dump, dumps # noqa TYPE = "BINARY" except ImportError as error: # XXX(asaitgalin): Sometimes module can't be imported because @@ -54,18 +54,14 @@ except ImportError as error: print("Warning! Failed to import YSON bindings: " + message, file=_sys.stderr) try: - from yt_yson_bindings import dump_parquet # noqa + from yt_yson_bindings import upload_parquet, dump_parquet # noqa HAS_PARQUET = True -except ImportError: - try: - from yt_yson_bindings import dump_parquete as dump_parquet # noqa - HAS_PARQUET = True - except ImportError as error: - message = str(error) - if "No module named" not in message: - import sys as _sys - if os.environ.get("YT_LOG_LEVEL", "").lower() == "debug": - print("Warning! Failed to import dump_parquet binding: " + message, file=_sys.stderr) +except ImportError as error: + message = str(error) + if "No module named" not in message: + import sys as _sys + if os.environ.get("YT_LOG_LEVEL", "").lower() == "debug": + print("Warning! Failed to import dump_parquet binding: " + message, file=_sys.stderr) if TYPE is None: from .parser import load, loads # noqa |