From 579f2736021e7435261812288bf7550140d745bb Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Tue, 11 Jun 2013 15:40:52 -0400 Subject: [PATCH] Make error code check use a range of values in binder.py --- tweepy/binder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tweepy/binder.py b/tweepy/binder.py index f0b0803..6295b48 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -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: -- 2.25.1