From ebd3c05c5bd01e5d7cfc812e1d13605cd3e16d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Setla?= Date: Wed, 31 Jan 2024 13:45:02 +0100 Subject: [PATCH] Use explicite self arguments instead of self.args --- aiohttp/client_exceptions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aiohttp/client_exceptions.py b/aiohttp/client_exceptions.py index 6fcfa51f92e..bd742ad19b5 100644 --- a/aiohttp/client_exceptions.py +++ b/aiohttp/client_exceptions.py @@ -272,7 +272,9 @@ def __repr__(self) -> str: return f"<{self.__class__.__name__} {self}>" def __str__(self) -> str: - return " - ".join(map(str, self.args)) + if self._description: + return f"{self._url} - {self._description}" + return self._url class InvalidRedirectURL(InvalidURL):