Skip to content

Commit a16507a

Browse files
authored
Update tce_demo.py
1 parent 1dfe4b9 commit a16507a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

qcloud_cos/tce_demo.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ def head_bucket(self, bucket_name):
7272

7373
def get_bucket_location(self, bucket_name):
7474
# 获取存储桶地域信息
75-
resp = self.client.get_bucket_location(Bucket=bucket_name + '-' +
76-
self.appid)
75+
resp = self.client.get_bucket_location(Bucket=bucket_name + '-' + self.appid)
7776
return resp["LocationConstraint"]
7877

7978
def list_objects(self, bucket_name):
@@ -135,8 +134,7 @@ def put_bucket_acl_with_GrantWrite(self, bucket_name, owner_uin, sub_uin):
135134

136135
def get_bucket_acl(self, bucket_name):
137136
# 获取存储桶访问控制权限
138-
resp = self.client.get_bucket_acl(Bucket=bucket_name + "-" +
139-
self.appid)
137+
resp = self.client.get_bucket_acl(Bucket=bucket_name + "-" + self.appid)
140138
return resp
141139

142140
def put_bucket_cors(self, bucket_name, max_age_seconds=0):
@@ -178,8 +176,7 @@ def put_bucket_multi_cors(self, bucket_name):
178176

179177
def get_bucket_cors(self, bucket_name):
180178
# 获取存储桶跨域访问规则
181-
resp = self.client.get_bucket_cors(Bucket=bucket_name + '-' +
182-
self.appid)
179+
resp = self.client.get_bucket_cors(Bucket=bucket_name + '-' + self.appid)
183180
return resp
184181

185182
def delete_bucket_cors(self, bucket_name):
@@ -356,8 +353,7 @@ def complete_multipart_upload(self, bucket_name, obj_name, upload_id,
356353
return resp
357354

358355
def list_multipart_uploads(self, bucket_name):
359-
resp = self.client.list_multipart_uploads(Bucket=bucket_name + '-' +
360-
self.appid)
356+
resp = self.client.list_multipart_uploads(Bucket=bucket_name + '-' + self.appid)
361357
return resp
362358

363359
def upload_file(self, bucket_name, obj_name, file_path):

0 commit comments

Comments
 (0)