From 997aba16c1e3b9e843a2be0c6532433f1477566c Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 17 Feb 2022 15:15:15 +0000 Subject: [PATCH] Handle another kind of exception --- handler/agora.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handler/agora.py b/handler/agora.py index f377d8b..b8e66bf 100644 --- a/handler/agora.py +++ b/handler/agora.py @@ -7,7 +7,7 @@ from twisted.internet.threads import deferToThread from json import loads from forex_python.converter import CurrencyRates from agoradesk_py import AgoraDesk -from httpx import ReadTimeout, ReadError +from httpx import ReadTimeout, ReadError, RemoteProtocolError from pycoingecko import CoinGeckoAPI from datetime import datetime from time import sleep @@ -25,7 +25,7 @@ def handle_exceptions(func): def inner_function(*args, **kwargs): try: rtrn = func(*args, **kwargs) - except (ReadTimeout, ReadError): + except (ReadTimeout, ReadError, RemoteProtocolError): return False if isinstance(rtrn, dict): if "success" in rtrn: