diff --git a/py/selenium/webdriver/common/utils.py b/py/selenium/webdriver/common/utils.py index 375838aceb757..766dd1b53b370 100644 --- a/py/selenium/webdriver/common/utils.py +++ b/py/selenium/webdriver/common/utils.py @@ -106,7 +106,7 @@ def is_connectable(port: int, host: Optional[str] = "localhost") -> bool: if socket_: try: socket_.shutdown(socket.SHUT_RDWR) - except: + except Exception: pass socket_.close() return result