Fix Python 3 compat
[ci skip]
This commit is contained in:
parent
e786e59050
commit
6cab7bf95d
1 changed files with 1 additions and 3 deletions
|
|
@ -9,8 +9,6 @@ Twitter Authentication, and miscellaneous methods that are useful when
|
||||||
dealing with the Twitter API
|
dealing with the Twitter API
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from requests.auth import HTTPBasicAuth
|
from requests.auth import HTTPBasicAuth
|
||||||
from requests_oauthlib import OAuth1, OAuth2
|
from requests_oauthlib import OAuth1, OAuth2
|
||||||
|
|
@ -136,7 +134,7 @@ class Twython(EndpointsMixin, object):
|
||||||
try:
|
try:
|
||||||
response = func(url, **requests_args)
|
response = func(url, **requests_args)
|
||||||
except requests.RequestException as e:
|
except requests.RequestException as e:
|
||||||
raise TwythonError, str(e), sys.exc_info()[2]
|
raise TwythonError(str(e))
|
||||||
content = response.content.decode('utf-8')
|
content = response.content.decode('utf-8')
|
||||||
|
|
||||||
# create stash for last function intel
|
# create stash for last function intel
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue