From 12225660683812a261941d0f396c4dd1e8ea5b61 Mon Sep 17 00:00:00 2001 From: Rafael Fedler Date: Sat, 2 Nov 2024 16:07:55 +0100 Subject: [PATCH] #672-fix-type-issue-while-handling-network-exception-option-2 --- sslyze/connection_helpers/tls_connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sslyze/connection_helpers/tls_connection.py b/sslyze/connection_helpers/tls_connection.py index 60963349..49631dec 100644 --- a/sslyze/connection_helpers/tls_connection.py +++ b/sslyze/connection_helpers/tls_connection.py @@ -315,7 +315,7 @@ def connect(self, should_retry_connection: bool = True) -> None: ) except OSError as e: # OSError is the parent of all (non-TLS) socket/connection errors so it should be last - if "Nassl SSL handshake failed" in e.args[0]: + if "Nassl SSL handshake failed" in str(e.args): # Special error returned by nassl raise ServerRejectedTlsHandshake( server_location=self._server_location,