From bc18d0c0c254b02e81b372d68c741910768a984b Mon Sep 17 00:00:00 2001 From: Clay McClure Date: Fri, 31 Dec 2010 07:44:55 +0800 Subject: [PATCH] Propagate connection failure exceptions up through verify_credentials --- tweepy/api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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( -- 2.25.1