Propagate connection failure exceptions up through verify_credentials
authorClay McClure <Clay.McClure@cmgdigital.com>
Thu, 30 Dec 2010 23:44:55 +0000 (07:44 +0800)
committerJoshua Roesslein <jroesslein@gmail.com>
Fri, 31 Dec 2010 05:48:43 +0000 (13:48 +0800)
tweepy/api.py

index a5c687a0dcd124c21dcd40d76481d4e4c80ca138..b2304b63ec0e94f227e63f8fa2a2c63bdf6559b5 100644 (file)
@@ -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(