Fixed type errror on api.py
This commit is contained in:
parent
38328e77ad
commit
14526cb3df
1 changed files with 2 additions and 0 deletions
|
|
@ -214,6 +214,8 @@ class Twython(EndpointsMixin, object):
|
|||
# {"errors":[{"code":34,"message":"Sorry,
|
||||
# that page does not exist"}]}
|
||||
error_message = content['errors'][0]['message']
|
||||
except TypeError:
|
||||
error_message = content['errors']
|
||||
except ValueError:
|
||||
# bad json data from Twitter for an error
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue