From fa51899a2490dfb17b45fb95fb2642785609018e Mon Sep 17 00:00:00 2001 From: jkhsjdhjs Date: Fri, 21 Jul 2023 11:44:20 +0000 Subject: [PATCH] urlinfo: catch superclass RequestException instead of each exception individually --- bot/urlinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/urlinfo.py b/bot/urlinfo.py index c66792e..24b1661 100644 --- a/bot/urlinfo.py +++ b/bot/urlinfo.py @@ -39,7 +39,7 @@ class URLInfo(Plugin): if size >= self.SIZE_LIMIT: return bytes_io.write(chunk) - except (requests.exceptions.ConnectionError, requests.exceptions.HTTPError, requests.exceptions.ReadTimeout, requests.exceptions.TooManyRedirects): + except requests.exceptions.RequestException: return bytes_io.seek(0)