From: Aaron Hill Date: Tue, 11 Jun 2013 19:40:52 +0000 (-0400) Subject: Make error code check use a range of values in binder.py X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=579f2736021e7435261812288bf7550140d745bb;p=tweepy.git Make error code check use a range of values in binder.py --- 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: