From c304d97609e9204ecf418b714d8894615e3ebb67 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Fri, 26 Jul 2024 10:47:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96ucloud=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ucloud/ufile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ucloud/ufile.py b/ucloud/ufile.py index 69ddc6e..391bda0 100644 --- a/ucloud/ufile.py +++ b/ucloud/ufile.py @@ -17,7 +17,7 @@ def get_private_url(key, bucket=BUCKET): # 判断文件是否存在 _, resp = UFILE_HANDLER.head_file(bucket, key) if resp.status_code == -1: - UCLOUD_LOGGER.warning(f"查询{key}时uCloud连接失败!") + UCLOUD_LOGGER.warning(f"查询({key})时uCloud连接失败!") raise ConnectionError("uCloud连接失败") if resp.status_code != 200: UCLOUD_LOGGER.warning(f"[{bucket}]中未找到({key})! status: {resp.status_code} error: {resp.error}") @@ -37,7 +37,7 @@ def copy_file(source_bucket, source_key, target_bucket, target_key): # 复制文件 _, resp = UFILE_HANDLER.copy(target_bucket, target_key, source_bucket, source_key) if resp.status_code == -1: - UCLOUD_LOGGER.warning(f"复制{source_key}时uCloud连接失败!") + UCLOUD_LOGGER.warning(f"复制({source_key})时uCloud连接失败!") return False if resp.status_code != 200: UCLOUD_LOGGER.warning( @@ -53,7 +53,7 @@ def upload_file(key, file_path, bucket=BUCKET): # 普通上传文件至云空间 _, resp = UFILE_HANDLER.putfile(bucket, key, file_path, header=None) if resp.status_code == -1: - UCLOUD_LOGGER.warning(f"上传{key}时uCloud连接失败!") + UCLOUD_LOGGER.warning(f"上传({key})时uCloud连接失败!") return False if resp.status_code != 200: UCLOUD_LOGGER.warning(f"上传({key})失败! status: {resp.status_code} error: {resp.error}")