Skip to content
Merged

S3 #83

Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions qcloud_cos/cos_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2163,6 +2163,8 @@ def _get_resumable_uploadid(self, bucket, key):
:param key(string): 分块上传路径名.
:return(string): 断点续传的uploadid,如果不存在则返回None.
"""
if key and key[0] == '/':
key = key[1:]
multipart_response = self.list_multipart_uploads(
Bucket=bucket,
Prefix=key
Expand Down
2 changes: 2 additions & 0 deletions qcloud_cos/cos_comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ def check_object_content_length(data):

def format_dict(data, key_lst):
"""转换返回dict中的可重复字段为list"""
if not (isinstance(data, dict) and isinstance(key_lst, list)):
return data
for key in key_lst:
# 将dict转为list,保持一致
if key in data and isinstance(data[key], dict):
Expand Down
2 changes: 1 addition & 1 deletion qcloud_cos/cos_threadpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def run(self):
self._task_queue.task_done()

def get_result(self):
return self._succ_task_num, self._fail_task_num, self._ret
return self._succ_task_num, self._fail_task_num, self._ret


class SimpleThreadPool:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
requests
requests>=2.8
dicttoxml
six