Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions qcloud_cos/tce_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from qcloud_cos import CosConfig
from qcloud_cos import CosS3Client
from qcloud_cos import CosServiceError
from qcloud_cos import CosClientError
import sys
import random
import string
Expand Down Expand Up @@ -235,7 +236,7 @@ def delete_objects(self, bucket_name, obj_list):
Bucket=bucket_name + '-' + self.appid, Delete=delete)
return resp

def delete_objects_with_quite(self, bucket_name, obj_list, quiet):
def delete_objects_with_quiet(self, bucket_name, obj_list, quiet):
# 批量删除对象
_obj = []
for obj in obj_list:
Expand Down Expand Up @@ -506,7 +507,7 @@ def upload_file(self, bucket_name, obj_name, file_path):
bucket_name="mainbkt", obj_list=["obj", "obja", "objb"])

# 删除多个对象,传入对象名list和quiet参数
resp = main.delete_objects_with_quite(
resp = main.delete_objects_with_quiet(
bucket_name="mainbkt",
obj_list=["obj", "obja", "objb"],
quiet="true")
Expand Down Expand Up @@ -605,5 +606,6 @@ def upload_file(self, bucket_name, obj_name, file_path):
print("Succeeded")

except Exception as e:

print("Failed")

# 可细化CosServiceError/CosClientError
print("Failed")