excepted Mastodon API Error with a too broad exception

This commit is contained in:
b3yond 2018-01-19 00:17:09 +01:00
parent 37b2706a3b
commit 04e05ee8ca

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