From: Josh Roesslein Date: Tue, 18 Aug 2009 06:06:07 +0000 (-0500) Subject: Handle 500 errors better. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1e6485cd2f96f0505139f722603d7b6862ec6a45;p=tweepy.git Handle 500 errors better. --- diff --git a/tweepy/binder.py b/tweepy/binder.py index c91b68f..5b3fe62 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -85,6 +85,8 @@ def bind_api(path, parser, allowed_param=None, method='GET', require_auth=False, resp = conn.getresponse() # If an error was returned, throw an exception + if resp.status == 500: + raise TweepError('Twitter server error!') if resp.status != 200: raise TweepError(parse_error(resp.read()))