From 6cab7bf95d8cfb0442341b7f908f2d7d26387c30 Mon Sep 17 00:00:00 2001 From: Mike Helmick Date: Tue, 25 Jun 2013 16:31:12 -0400 Subject: [PATCH] Fix Python 3 compat [ci skip] --- twython/api.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/twython/api.py b/twython/api.py index f4a7a0b..d265186 100644 --- a/twython/api.py +++ b/twython/api.py @@ -9,8 +9,6 @@ Twitter Authentication, and miscellaneous methods that are useful when dealing with the Twitter API """ -import sys - import requests from requests.auth import HTTPBasicAuth from requests_oauthlib import OAuth1, OAuth2 @@ -136,7 +134,7 @@ class Twython(EndpointsMixin, object): try: response = func(url, **requests_args) except requests.RequestException as e: - raise TwythonError, str(e), sys.exc_info()[2] + raise TwythonError(str(e)) content = response.content.decode('utf-8') # create stash for last function intel