Skip to content

Commit

Permalink
Merge pull request #83 from dt3310321/s3
Browse files Browse the repository at this point in the history
S3
  • Loading branch information
dt3310321 authored Mar 26, 2019
2 parents 8f1bdc7 + d84af53 commit 781d285
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
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

0 comments on commit 781d285

Please sign in to comment.