excepted Mastodon API Error with a too broad exception
This commit is contained in:
parent
37b2706a3b
commit
04e05ee8ca
|
@ -70,8 +70,12 @@ class RetootBot(object):
|
||||||
|
|
||||||
:return: list of statuses
|
:return: list of statuses
|
||||||
"""
|
"""
|
||||||
all = self.m.notifications()
|
|
||||||
mentions = []
|
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:
|
for status in all:
|
||||||
if (status['type'] == 'mention' and status['status']['id'] not in self.seen_toots):
|
if (status['type'] == 'mention' and status['status']['id'] not in self.seen_toots):
|
||||||
# save state
|
# save state
|
||||||
|
|
Loading…
Reference in a new issue