Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
hotfix upload
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed Mar 20, 2020
1 parent c8da0dd commit fe37099
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/upload2qiniu.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ def __init__(self, access_key, secret_key, bucket_name: str):
def upload_file(self, key, localfile):
token = self._auth.upload_token(self._bucket, key)
ret, info = put_file(token, key, localfile)
assert ret['key'] == key
assert ret['hash'] == etag(localfile)
if ret: # ret possibly is None
assert ret['key'] == key
assert ret['hash'] == etag(localfile)
return info


Expand Down

0 comments on commit fe37099

Please sign in to comment.