From: Clay McClure Date: Thu, 30 Dec 2010 23:44:55 +0000 (+0800) Subject: Propagate connection failure exceptions up through verify_credentials X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bc18d0c0c254b02e81b372d68c741910768a984b;p=tweepy.git Propagate connection failure exceptions up through verify_credentials --- diff --git a/tweepy/api.py b/tweepy/api.py index a5c687a..b2304b6 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -299,8 +299,10 @@ class API(object): payload_type = 'user', require_auth = True )(self) - except TweepError: - return False + except TweepError, e: + if e.response and e.response.status == 401: + return False + raise """ account/rate_limit_status """ rate_limit_status = bind_api(