From 12bda51c86fc6038fea0e4385e5b28ef531ade88 Mon Sep 17 00:00:00 2001 From: yanghua Date: Wed, 11 Sep 2024 12:40:21 +0800 Subject: [PATCH] Fix code style issue --- tosfs/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tosfs/core.py b/tosfs/core.py index 535fb5b..0634f5e 100644 --- a/tosfs/core.py +++ b/tosfs/core.py @@ -25,6 +25,7 @@ from fsspec import AbstractFileSystem from fsspec.spec import AbstractBufferedFile from fsspec.utils import setup_logging as setup_logger +from tos.exceptions import TosClientError, TosServerError from tos.models import CommonPrefixInfo from tos.models2 import ( CreateMultipartUploadOutput, @@ -428,7 +429,7 @@ def rm( else: try: self._list_and_batch_delete_objects(bucket, key) - except (tos.exceptions.TosClientError, tos.exceptions.TosServerError) as e: + except (TosClientError, TosServerError) as e: raise e except Exception as e: raise TosfsError(f"Tosfs failed with unknown error: {e}") from e