From c2df1d83f8c9ca6385eac63de2117d6bc42fed63 Mon Sep 17 00:00:00 2001 From: anon_user Date: Sun, 15 Sep 2019 07:30:50 +0200 Subject: [PATCH] don't spam the log if the network is failing --- active_bots/mastodonbot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/active_bots/mastodonbot.py b/active_bots/mastodonbot.py index efc97c6..3904568 100755 --- a/active_bots/mastodonbot.py +++ b/active_bots/mastodonbot.py @@ -25,6 +25,8 @@ class MastodonBot(Bot): return mentions try: notifications = m.notifications() + except mastodon.MastodonNetworkError: + return mentions except mastodon.MastodonInternalServerError: try: logger.error("Mastodon Error: 500. Server: " + m.instance()['urls']['streaming_api'])