fix: exception type in tracker readiness check

This commit is contained in:
gmega 2025-01-12 08:23:39 -03:00
parent 83fc90343c
commit dcbe2f3898
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18

View File

@ -1,7 +1,7 @@
import socket
import requests
from urllib3.exceptions import RequestError
from requests.exceptions import ConnectionError
from urllib3.util import Url
from benchmarks.core.experiments.experiments import ExperimentComponent
@ -15,7 +15,7 @@ class Tracker(ExperimentComponent):
try:
requests.get(str(self.announce_url))
return True
except (ConnectionError, RequestError, socket.gaierror):
except (ConnectionError, socket.gaierror):
return False
def __str__(self) -> str: