excepted Mastodon API Error with a too broad exception

master
b3yond 2018-01-19 00:17:09 +01:00
parent 45d5166499
commit f5759ad60d
1 changed files with 5 additions and 1 deletions

View File

@ -70,8 +70,12 @@ class RetootBot(object):
:return: list of statuses
"""
all = self.m.notifications()
mentions = []
try:
all = self.m.notifications()
except: # mastodon.Mastodon.MastodonAPIError is unfortunately not in __init__.py
logger.error("Unknown Mastodon API Error.", exc_info=True)
return mentions
for status in all:
if (status['type'] == 'mention' and status['status']['id'] not in self.seen_toots):
# save state