From e18244e1493410371fe5197173b4d41f4fc8037c Mon Sep 17 00:00:00 2001 From: b3yond Date: Sat, 2 Feb 2019 22:02:56 +0100 Subject: [PATCH] don't log Mastodon 502 errors. --- active_bots/mastodonbot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/active_bots/mastodonbot.py b/active_bots/mastodonbot.py index 0189dca..416bb51 100755 --- a/active_bots/mastodonbot.py +++ b/active_bots/mastodonbot.py @@ -2,7 +2,7 @@ from bot import Bot import logging -from mastodon import Mastodon +from mastodon import Mastodon, MastodonServerError import re from report import Report @@ -25,8 +25,8 @@ class MastodonBot(Bot): return mentions try: notifications = m.notifications() - except Exception: - logger.error("Unknown Mastodon API Error.", exc_info=True) + except MastodonServerError: + logger.error("Unknown Mastodon API Error: 502") return mentions for status in notifications: if (status['type'] == 'mention' and