8000 change ResponseInfo ok to return True when 2xx · qiniu/python-sdk@da7e06c · GitHub
[go: up one dir, main page]

Skip to content

Commit da7e06c

Browse files
committed
change ResponseInfo ok to return True when 2xx
1 parent 0961add commit da7e06c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qiniu/http/response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, response, exception=None):
4343
self.error = 'server is not qiniu'
4444

4545
def ok(self):
46-
return self.status_code == 200 and self.req_id is not None
46+
return self.status_code // 100 == 2
4747

4848
def need_retry(self):
4949
if self.__response is None or self.req_id is None:

0 commit comments

Comments
 (0)
0