From ff08df043adfd83230a2fb9eb8170e47efbff2f6 Mon Sep 17 00:00:00 2001 From: Glandos Date: Sun, 10 Jul 2022 15:53:54 +0200 Subject: [PATCH] change error format to be compatible with py < 3.10 --- ihatemoney/currency_convertor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ihatemoney/currency_convertor.py b/ihatemoney/currency_convertor.py index 3ff21ec3..0432e683 100644 --- a/ihatemoney/currency_convertor.py +++ b/ihatemoney/currency_convertor.py @@ -28,7 +28,7 @@ class CurrencyConverter(object, metaclass=Singleton): rates = requests.get(self.api_url).json()["rates"] except Exception as e: warnings.warn( - f"Call to {self.api_url} failed: {traceback.format_exception_only(e)[0].strip()}" + f"Call to {self.api_url} failed: {traceback.format_exc(limit=0).strip()}" ) # In case of any exception, let's have an empty value rates = {}