forked from loafle/openapi-generator-original
Python - Increase range of valid status codes (#5901)
swagger-client shouldn't throw ApiException if status code in range 200-299
This commit is contained in:
committed by
wing328
parent
d67cb9c30b
commit
69ce921371
@@ -206,7 +206,7 @@ class RESTClientObject(object):
|
||||
# log response body
|
||||
logger.debug("response body: %s", r.data)
|
||||
|
||||
if r.status not in range(200, 206):
|
||||
if not 200 <= r.status <= 299:
|
||||
raise ApiException(http_resp=r)
|
||||
|
||||
return r
|
||||
|
||||
@@ -215,7 +215,7 @@ class RESTClientObject(object):
|
||||
# log response body
|
||||
logger.debug("response body: %s", r.data)
|
||||
|
||||
if r.status not in range(200, 206):
|
||||
if not 200 <= r.status <= 299:
|
||||
raise ApiException(http_resp=r)
|
||||
|
||||
return r
|
||||
|
||||
Reference in New Issue
Block a user