Skip to content

Commit bbf9756

Browse files
committed
add up host2
1 parent 1b0871e commit bbf9756

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

qiniu/io.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ def put(uptoken, key, data, extra=None):
5252
files = [
5353
{'filename': fname, 'data': data, 'mime_type': extra.mime_type},
5454
]
55-
return rpc.Client(conf.UP_HOST).call_with_multipart("/", fields, files)
55+
ret, err, code = rpc.Client(conf.UP_HOST).call_with_multipart("/", fields, files)
56+
if err is None or code == 571 or code == 614:
57+
return ret, err
5658

59+
ret, err, code = rpc.Client(conf.UP_HOST2).call_with_multipart("/", fields, files)
60+
return ret, err
5761

5862
def put_file(uptoken, key, localfile, extra=None):
5963
""" put a file to Qiniu

0 commit comments

Comments
 (0)