Commit 579f2736 authored by Aaron Hill's avatar Aaron Hill
Browse files

Make error code check use a range of values in binder.py

parent 9282cd91
......@@ -165,7 +165,7 @@ def bind_api(**config):
# If an error was returned, throw an exception
self.api.last_response = resp
if resp.status not in [200, 201, 202]:
if resp.status and not 200 <= resp.status < 300:
try:
error_msg = self.api.parser.parse_error(resp.read())
except Exception:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment