chore: update imports to prevent shadowing internal exceptions

This commit is contained in:
Matthias
2024-11-25 06:39:18 +01:00
parent 8c6283a687
commit 748233ca70
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ from urllib.parse import urlencode, urlparse, urlunparse
import requests
from requests.adapters import HTTPAdapter
from requests.exceptions import ConnectionError
from requests.exceptions import ConnectionError as RequestConnectionError
logger = logging.getLogger("ft_rest_client")
@@ -53,7 +53,7 @@ class FtRestClient:
resp = self._session.request(method, url, headers=hd, data=json.dumps(data))
# return resp.text
return resp.json()
except ConnectionError:
except RequestConnectionError:
logger.warning(f"Connection error - could not connect to {netloc}.")
def _get(self, apipath, params: ParamsT = None):