Skip to content

Commit e1ede44

Browse files
authored
Merge pull request #76 from WookieGao/master
pep8 adapted
2 parents 440a437 + 9329933 commit e1ede44

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

qcloud_cos/tce_demo.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from qcloud_cos import CosConfig
44
from qcloud_cos import CosS3Client
55
from qcloud_cos import CosServiceError
6+
from qcloud_cos import CosClientError
67
import sys
78
import random
89
import string
@@ -235,7 +236,7 @@ def delete_objects(self, bucket_name, obj_list):
235236
Bucket=bucket_name + '-' + self.appid, Delete=delete)
236237
return resp
237238

238-
def delete_objects_with_quite(self, bucket_name, obj_list, quiet):
239+
def delete_objects_with_quiet(self, bucket_name, obj_list, quiet):
239240
# 批量删除对象
240241
_obj = []
241242
for obj in obj_list:
@@ -506,7 +507,7 @@ def upload_file(self, bucket_name, obj_name, file_path):
506507
bucket_name="mainbkt", obj_list=["obj", "obja", "objb"])
507508

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

607608
except Exception as e:
608-
609-
print("Failed")
609+
610+
# 可细化CosServiceError/CosClientError
611+
print("Failed")

0 commit comments

Comments
 (0)