调整日志

This commit is contained in:
2024-07-25 13:46:25 +08:00
parent ac42f1d454
commit 7c6f8b4d31

View File

@@ -53,7 +53,7 @@ def upload_file(key, file_path, bucket=BUCKET):
# 普通上传文件至云空间 # 普通上传文件至云空间
_, resp = UFILE_HANDLER.putfile(bucket, key, file_path, header=None) _, resp = UFILE_HANDLER.putfile(bucket, key, file_path, header=None)
if resp.status_code == -1: if resp.status_code == -1:
UCLOUD_LOGGER.warning(f"上传{key}时uCloud连接失败!即将重试...") UCLOUD_LOGGER.warning(f"上传{key}时uCloud连接失败!")
return False return False
if resp.status_code != 200: if resp.status_code != 200:
UCLOUD_LOGGER.warning(f"上传({key})失败! status: {resp.status_code} error: {resp.error}") UCLOUD_LOGGER.warning(f"上传({key})失败! status: {resp.status_code} error: {resp.error}")