catch more twitter exceptions

This commit is contained in:
codl 2017-09-05 12:58:57 +02:00
parent 2ad076e63c
commit 4b44682827
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 19 additions and 19 deletions

View File

@ -124,6 +124,7 @@ def fetch_acc(account, cursor):
print("no twitter access, aborting")
return
try:
user = t.account.verify_credentials()
db.session.merge(account_from_api_user_object(user))
@ -143,7 +144,6 @@ def fetch_acc(account, cursor):
if most_recent_post:
kwargs['since_id'] = most_recent_post.twitter_id
try:
tweets = t.statuses.user_timeline(**kwargs)
except (TwitterError, URLError) as e:
handle_error(e)