Commit 8baa1f49 authored by Alexandre's avatar Alexandre
Browse files

Verbose output

parent f4edcb0c
......@@ -348,7 +348,11 @@ class ConnectionDoT(Connection):
if self.connect(addrinfo[0], addrinfo[1]):
connection_success = True
if self.verbose:
print("Trying another IP address")
if not connection_success:
if self.verbose:
print("No other IP address")
error(f'Could not connect to "{server}"')
def connect(self, addr, sock_family):
......@@ -376,6 +380,8 @@ class ConnectionDoT(Connection):
# TODO We may here have exceptions such as OpenSSL.SSL.ZeroReturnError
except TimeoutConnectionError:
if self.verbose:
return False
self.cert = self.session.get_peer_certificate()
# RFC 7858, section 4.2 and appendix A
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment