TwythonError should go off of AttributeError instead
This commit is contained in:
parent
7ac349bca4
commit
b225918165
2 changed files with 11 additions and 11 deletions
|
|
@ -46,7 +46,7 @@ except ImportError:
|
|||
# Seriously wtf is wrong with you if you get this Exception.
|
||||
raise Exception("Twython requires the simplejson library (or Python 2.6) to work. http://www.undefined.org/python/")
|
||||
|
||||
class TwythonError(Exception):
|
||||
class TwythonError(AttributeError):
|
||||
"""
|
||||
Generic error class, catch-all for most Twython issues.
|
||||
Special cases are handled by APILimit and AuthError.
|
||||
|
|
@ -176,7 +176,7 @@ class Twython(object):
|
|||
if api_call in api_table:
|
||||
return get.__get__(self)
|
||||
else:
|
||||
raise AttributeError, api_call
|
||||
raise TwythonError, api_call
|
||||
|
||||
def get_authentication_tokens(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue