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:
Stanislav Bondarenko
2017-06-22 23:31:30 -04:00
committed by wing328
parent d67cb9c30b
commit 69ce921371
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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