We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix connection info in ClientConnectorError client exception
The message like `Cannot connect to host www.google.com:443 ssl:None` is misleading.
`ssl:None` means 'default', not 'disabled'

`Cannot connect to host www.google.com:443 ssl:[default]` looks much better

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `aiohttp/client_exceptions.py`
Content:
```
1 """HTTP related errors."""
2 
3 import asyncio
4 from typing import TYPE_CHECKING, Any, Optional, Tuple, Union
5 
6 from .typedefs import _CIMultiDict
7 
8 try:
9     import ssl
10     SSLContext = ssl.SSLContext
11 except ImportError:  # pragma: no cover
12     ssl = SSLContext = None  # type: ignore
13 
14 
15 if TYPE_CHECKING:  # pragma: no cover
16     from .client_reqrep import (RequestInfo, ClientResponse, ConnectionKey,  # noqa
17                                 Fingerprint)
18 else:
19     RequestInfo = ClientResponse = ConnectionKey = None
20 
21 
22 __all__ = (
23     'ClientError',
24 
25     'ClientConnectionError',
26     'ClientOSError', 'ClientConnectorError', 'ClientProxyConnectionError',
27 
28     'ClientSSLError',
29     'ClientConnectorSSLError', 'ClientConnectorCertificateError',
30 
31     'ServerConnectionError', 'ServerTimeoutError', 'ServerDisconnectedError',
32     'ServerFingerprintMismatch',
33 
34     'ClientResponseError', 'ClientHttpProxyError',
35     'WSServerHandshakeError', 'ContentTypeError',
36 
37     'ClientPayloadError', 'InvalidURL')
38 
39 
40 class ClientError(Exception):
41     """Base class for client connection errors."""
42 
43 
44 class ClientResponseError(ClientError):
45     """Connection error during reading response.
46 
47     request_info: instance of RequestInfo
48     """
49 
50     def __init__(self, request_info: RequestInfo,
51                  history: Tuple[ClientResponse, ...], *,
52                  status: Optional[int]=None,
53                  message: str='',
54                  headers: Optional[_CIMultiDict]=None) -> None:
55         self.request_info = request_info
56         if status is not None:
57             self.status = status
58         else:
59             self.status = 0
60         self.message = message
61         self.headers = headers
62         self.history = history
63         self.args = (request_info, history)
64 
65     def __str__(self) -> str:
66         return ("%s, message=%r, url=%r" %
67                 (self.status, self.message, self.request_info.real_url))
68 
69     def __repr__(self) -> str:
70         args = "%r, %r" % (self.request_info, self.history)
71         if self.status != 0:
72             args += ", status=%r" % (self.status,)
73         if self.message != '':
74             args += ", message=%r" % (self.message,)
75         if self.headers is not None:
76             args += ", headers=%r" % (self.headers,)
77         return "%s(%s)" % (type(self).__name__, args)
78 
79 
80 class ContentTypeError(ClientResponseError):
81     """ContentType found is not valid."""
82 
83 
84 class WSServerHandshakeError(ClientResponseError):
85     """websocket server handshake error."""
86 
87 
88 class ClientHttpProxyError(ClientResponseError):
89     """HTTP proxy error.
90 
91     Raised in :class:`aiohttp.connector.TCPConnector` if
92     proxy responds with status other than ``200 OK``
93     on ``CONNECT`` request.
94     """
95 
96 
97 class TooManyRedirects(ClientResponseError):
98     """Client was redirected too many times."""
99 
100 
101 class ClientConnectionError(ClientError):
102     """Base class for client socket errors."""
103 
104 
105 class ClientOSError(ClientConnectionError, OSError):
106     """OSError error."""
107 
108 
109 class ClientConnectorError(ClientOSError):
110     """Client connector error.
111 
112     Raised in :class:`aiohttp.connector.TCPConnector` if
113         connection to proxy can not be established.
114     """
115     def __init__(self, connection_key: ConnectionKey,
116                  os_error: OSError) -> None:
117         self._conn_key = connection_key
118         self._os_error = os_error
119         super().__init__(os_error.errno, os_error.strerror)
120         self.args = (connection_key, os_error)
121 
122     @property
123     def os_error(self) -> OSError:
124         return self._os_error
125 
126     @property
127     def host(self) -> str:
128         return self._conn_key.host
129 
130     @property
131     def port(self) -> Optional[int]:
132         return self._conn_key.port
133 
134     @property
135     def ssl(self) -> Union[SSLContext, None, bool, 'Fingerprint']:
136         return self._conn_key.ssl
137 
138     def __str__(self) -> str:
139         return ('Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} [{1}]'
140                 .format(self, self.strerror))
141 
142     # OSError.__reduce__ does too much black magick
143     __reduce__ = BaseException.__reduce__
144 
145 
146 class ClientProxyConnectionError(ClientConnectorError):
147     """Proxy connection error.
148 
149     Raised in :class:`aiohttp.connector.TCPConnector` if
150         connection to proxy can not be established.
151     """
152 
153 
154 class ServerConnectionError(ClientConnectionError):
155     """Server connection errors."""
156 
157 
158 class ServerDisconnectedError(ServerConnectionError):
159     """Server disconnected."""
160 
161     def __init__(self, message: Optional[str]=None) -> None:
162         self.message = message
163         if message is None:
164             self.args = ()
165         else:
166             self.args = (message,)
167 
168 
169 class ServerTimeoutError(ServerConnectionError, asyncio.TimeoutError):
170     """Server timeout error."""
171 
172 
173 class ServerFingerprintMismatch(ServerConnectionError):
174     """SSL certificate does not match expected fingerprint."""
175 
176     def __init__(self, expected: bytes, got: bytes,
177                  host: str, port: int) -> None:
178         self.expected = expected
179         self.got = got
180         self.host = host
181         self.port = port
182         self.args = (expected, got, host, port)
183 
184     def __repr__(self) -> str:
185         return '<{} expected={!r} got={!r} host={!r} port={!r}>'.format(
186             self.__class__.__name__, self.expected, self.got,
187             self.host, self.port)
188 
189 
190 class ClientPayloadError(ClientError):
191     """Response payload error."""
192 
193 
194 class InvalidURL(ClientError, ValueError):
195     """Invalid URL.
196 
197     URL used for fetching is malformed, e.g. it doesn't contains host
198     part."""
199 
200     # Derive from ValueError for backward compatibility
201 
202     def __init__(self, url: Any) -> None:
203         # The type of url is not yarl.URL because the exception can be raised
204         # on URL(url) call
205         super().__init__(url)
206 
207     @property
208     def url(self) -> Any:
209         return self.args[0]
210 
211     def __repr__(self) -> str:
212         return '<{} {}>'.format(self.__class__.__name__, self.url)
213 
214 
215 class ClientSSLError(ClientConnectorError):
216     """Base error for ssl.*Errors."""
217 
218 
219 if ssl is not None:
220     cert_errors = (ssl.CertificateError,)
221     cert_errors_bases = (ClientSSLError, ssl.CertificateError,)
222 
223     ssl_errors = (ssl.SSLError,)
224     ssl_error_bases = (ClientSSLError, ssl.SSLError)
225 else:  # pragma: no cover
226     cert_errors = tuple()
227     cert_errors_bases = (ClientSSLError, ValueError,)
228 
229     ssl_errors = tuple()
230     ssl_error_bases = (ClientSSLError,)
231 
232 
233 class ClientConnectorSSLError(*ssl_error_bases):  # type: ignore
234     """Response ssl error."""
235 
236 
237 class ClientConnectorCertificateError(*cert_errors_bases):  # type: ignore
238     """Response certificate error."""
239 
240     def __init__(self, connection_key:
241                  ConnectionKey, certificate_error: Exception) -> None:
242         self._conn_key = connection_key
243         self._certificate_error = certificate_error
244         self.args = (connection_key, certificate_error)
245 
246     @property
247     def certificate_error(self) -> Exception:
248         return self._certificate_error
249 
250     @property
251     def host(self) -> str:
252         return self._conn_key.host
253 
254     @property
255     def port(self) -> Optional[int]:
256         return self._conn_key.port
257 
258     @property
259     def ssl(self) -> bool:
260         return self._conn_key.is_ssl
261 
262     def __str__(self) -> str:
263         return ('Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} '
264                 '[{0.certificate_error.__class__.__name__}: '
265                 '{0.certificate_error.args}]'.format(self))
266
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/aiohttp/client_exceptions.py b/aiohttp/client_exceptions.py
--- a/aiohttp/client_exceptions.py
+++ b/aiohttp/client_exceptions.py
@@ -136,8 +136,9 @@
         return self._conn_key.ssl
 
     def __str__(self) -> str:
-        return ('Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} [{1}]'
-                .format(self, self.strerror))
+        return ('Cannot connect to host {0.host}:{0.port} ssl:{1} [{2}]'
+                .format(self, self.ssl if self.ssl is not None else 'default',
+                        self.strerror))
 
     # OSError.__reduce__ does too much black magick
     __reduce__ = BaseException.__reduce__

{"golden_diff": "diff --git a/aiohttp/client_exceptions.py b/aiohttp/client_exceptions.py\n--- a/aiohttp/client_exceptions.py\n+++ b/aiohttp/client_exceptions.py\n@@ -136,8 +136,9 @@\n         return self._conn_key.ssl\n \n     def __str__(self) -> str:\n-        return ('Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} [{1}]'\n-                .format(self, self.strerror))\n+        return ('Cannot connect to host {0.host}:{0.port} ssl:{1} [{2}]'\n+                .format(self, self.ssl if self.ssl is not None else 'default',\n+                        self.strerror))\n \n     # OSError.__reduce__ does too much black magick\n     __reduce__ = BaseException.__reduce__\n", "issue": "Fix connection info in ClientConnectorError client exception\nThe message like `Cannot connect to host www.google.com:443 ssl:None` is misleading.\r\n`ssl:None` means 'default', not 'disabled'\r\n\r\n`Cannot connect to host www.google.com:443 ssl:[default]` looks much better\n", "before_files": [{"content": "\"\"\"HTTP related errors.\"\"\"\n\nimport asyncio\nfrom typing import TYPE_CHECKING, Any, Optional, Tuple, Union\n\nfrom .typedefs import _CIMultiDict\n\ntry:\n    import ssl\n    SSLContext = ssl.SSLContext\nexcept ImportError:  # pragma: no cover\n    ssl = SSLContext = None  # type: ignore\n\n\nif TYPE_CHECKING:  # pragma: no cover\n    from .client_reqrep import (RequestInfo, ClientResponse, ConnectionKey,  # noqa\n                                Fingerprint)\nelse:\n    RequestInfo = ClientResponse = ConnectionKey = None\n\n\n__all__ = (\n    'ClientError',\n\n    'ClientConnectionError',\n    'ClientOSError', 'ClientConnectorError', 'ClientProxyConnectionError',\n\n    'ClientSSLError',\n    'ClientConnectorSSLError', 'ClientConnectorCertificateError',\n\n    'ServerConnectionError', 'ServerTimeoutError', 'ServerDisconnectedError',\n    'ServerFingerprintMismatch',\n\n    'ClientResponseError', 'ClientHttpProxyError',\n    'WSServerHandshakeError', 'ContentTypeError',\n\n    'ClientPayloadError', 'InvalidURL')\n\n\nclass ClientError(Exception):\n    \"\"\"Base class for client connection errors.\"\"\"\n\n\nclass ClientResponseError(ClientError):\n    \"\"\"Connection error during reading response.\n\n    request_info: instance of RequestInfo\n    \"\"\"\n\n    def __init__(self, request_info: RequestInfo,\n                 history: Tuple[ClientResponse, ...], *,\n                 status: Optional[int]=None,\n                 message: str='',\n                 headers: Optional[_CIMultiDict]=None) -> None:\n        self.request_info = request_info\n        if status is not None:\n            self.status = status\n        else:\n            self.status = 0\n        self.message = message\n        self.headers = headers\n        self.history = history\n        self.args = (request_info, history)\n\n    def __str__(self) -> str:\n        return (\"%s, message=%r, url=%r\" %\n                (self.status, self.message, self.request_info.real_url))\n\n    def __repr__(self) -> str:\n        args = \"%r, %r\" % (self.request_info, self.history)\n        if self.status != 0:\n            args += \", status=%r\" % (self.status,)\n        if self.message != '':\n            args += \", message=%r\" % (self.message,)\n        if self.headers is not None:\n            args += \", headers=%r\" % (self.headers,)\n        return \"%s(%s)\" % (type(self).__name__, args)\n\n\nclass ContentTypeError(ClientResponseError):\n    \"\"\"ContentType found is not valid.\"\"\"\n\n\nclass WSServerHandshakeError(ClientResponseError):\n    \"\"\"websocket server handshake error.\"\"\"\n\n\nclass ClientHttpProxyError(ClientResponseError):\n    \"\"\"HTTP proxy error.\n\n    Raised in :class:`aiohttp.connector.TCPConnector` if\n    proxy responds with status other than ``200 OK``\n    on ``CONNECT`` request.\n    \"\"\"\n\n\nclass TooManyRedirects(ClientResponseError):\n    \"\"\"Client was redirected too many times.\"\"\"\n\n\nclass ClientConnectionError(ClientError):\n    \"\"\"Base class for client socket errors.\"\"\"\n\n\nclass ClientOSError(ClientConnectionError, OSError):\n    \"\"\"OSError error.\"\"\"\n\n\nclass ClientConnectorError(ClientOSError):\n    \"\"\"Client connector error.\n\n    Raised in :class:`aiohttp.connector.TCPConnector` if\n        connection to proxy can not be established.\n    \"\"\"\n    def __init__(self, connection_key: ConnectionKey,\n                 os_error: OSError) -> None:\n        self._conn_key = connection_key\n        self._os_error = os_error\n        super().__init__(os_error.errno, os_error.strerror)\n        self.args = (connection_key, os_error)\n\n    @property\n    def os_error(self) -> OSError:\n        return self._os_error\n\n    @property\n    def host(self) -> str:\n        return self._conn_key.host\n\n    @property\n    def port(self) -> Optional[int]:\n        return self._conn_key.port\n\n    @property\n    def ssl(self) -> Union[SSLContext, None, bool, 'Fingerprint']:\n        return self._conn_key.ssl\n\n    def __str__(self) -> str:\n        return ('Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} [{1}]'\n                .format(self, self.strerror))\n\n    # OSError.__reduce__ does too much black magick\n    __reduce__ = BaseException.__reduce__\n\n\nclass ClientProxyConnectionError(ClientConnectorError):\n    \"\"\"Proxy connection error.\n\n    Raised in :class:`aiohttp.connector.TCPConnector` if\n        connection to proxy can not be established.\n    \"\"\"\n\n\nclass ServerConnectionError(ClientConnectionError):\n    \"\"\"Server connection errors.\"\"\"\n\n\nclass ServerDisconnectedError(ServerConnectionError):\n    \"\"\"Server disconnected.\"\"\"\n\n    def __init__(self, message: Optional[str]=None) -> None:\n        self.message = message\n        if message is None:\n            self.args = ()\n        else:\n            self.args = (message,)\n\n\nclass ServerTimeoutError(ServerConnectionError, asyncio.TimeoutError):\n    \"\"\"Server timeout error.\"\"\"\n\n\nclass ServerFingerprintMismatch(ServerConnectionError):\n    \"\"\"SSL certificate does not match expected fingerprint.\"\"\"\n\n    def __init__(self, expected: bytes, got: bytes,\n                 host: str, port: int) -> None:\n        self.expected = expected\n        self.got = got\n        self.host = host\n        self.port = port\n        self.args = (expected, got, host, port)\n\n    def __repr__(self) -> str:\n        return '<{} expected={!r} got={!r} host={!r} port={!r}>'.format(\n            self.__class__.__name__, self.expected, self.got,\n            self.host, self.port)\n\n\nclass ClientPayloadError(ClientError):\n    \"\"\"Response payload error.\"\"\"\n\n\nclass InvalidURL(ClientError, ValueError):\n    \"\"\"Invalid URL.\n\n    URL used for fetching is malformed, e.g. it doesn't contains host\n    part.\"\"\"\n\n    # Derive from ValueError for backward compatibility\n\n    def __init__(self, url: Any) -> None:\n        # The type of url is not yarl.URL because the exception can be raised\n        # on URL(url) call\n        super().__init__(url)\n\n    @property\n    def url(self) -> Any:\n        return self.args[0]\n\n    def __repr__(self) -> str:\n        return '<{} {}>'.format(self.__class__.__name__, self.url)\n\n\nclass ClientSSLError(ClientConnectorError):\n    \"\"\"Base error for ssl.*Errors.\"\"\"\n\n\nif ssl is not None:\n    cert_errors = (ssl.CertificateError,)\n    cert_errors_bases = (ClientSSLError, ssl.CertificateError,)\n\n    ssl_errors = (ssl.SSLError,)\n    ssl_error_bases = (ClientSSLError, ssl.SSLError)\nelse:  # pragma: no cover\n    cert_errors = tuple()\n    cert_errors_bases = (ClientSSLError, ValueError,)\n\n    ssl_errors = tuple()\n    ssl_error_bases = (ClientSSLError,)\n\n\nclass ClientConnectorSSLError(*ssl_error_bases):  # type: ignore\n    \"\"\"Response ssl error.\"\"\"\n\n\nclass ClientConnectorCertificateError(*cert_errors_bases):  # type: ignore\n    \"\"\"Response certificate error.\"\"\"\n\n    def __init__(self, connection_key:\n                 ConnectionKey, certificate_error: Exception) -> None:\n        self._conn_key = connection_key\n        self._certificate_error = certificate_error\n        self.args = (connection_key, certificate_error)\n\n    @property\n    def certificate_error(self) -> Exception:\n        return self._certificate_error\n\n    @property\n    def host(self) -> str:\n        return self._conn_key.host\n\n    @property\n    def port(self) -> Optional[int]:\n        return self._conn_key.port\n\n    @property\n    def ssl(self) -> bool:\n        return self._conn_key.is_ssl\n\n    def __str__(self) -> str:\n        return ('Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} '\n                '[{0.certificate_error.__class__.__name__}: '\n                '{0.certificate_error.args}]'.format(self))\n", "path": "aiohttp/client_exceptions.py"}], "after_files": [{"content": "\"\"\"HTTP related errors.\"\"\"\n\nimport asyncio\nfrom typing import TYPE_CHECKING, Any, Optional, Tuple, Union\n\nfrom .typedefs import _CIMultiDict\n\ntry:\n    import ssl\n    SSLContext = ssl.SSLContext\nexcept ImportError:  # pragma: no cover\n    ssl = SSLContext = None  # type: ignore\n\n\nif TYPE_CHECKING:  # pragma: no cover\n    from .client_reqrep import (RequestInfo, ClientResponse, ConnectionKey,  # noqa\n                                Fingerprint)\nelse:\n    RequestInfo = ClientResponse = ConnectionKey = None\n\n\n__all__ = (\n    'ClientError',\n\n    'ClientConnectionError',\n    'ClientOSError', 'ClientConnectorError', 'ClientProxyConnectionError',\n\n    'ClientSSLError',\n    'ClientConnectorSSLError', 'ClientConnectorCertificateError',\n\n    'ServerConnectionError', 'ServerTimeoutError', 'ServerDisconnectedError',\n    'ServerFingerprintMismatch',\n\n    'ClientResponseError', 'ClientHttpProxyError',\n    'WSServerHandshakeError', 'ContentTypeError',\n\n    'ClientPayloadError', 'InvalidURL')\n\n\nclass ClientError(Exception):\n    \"\"\"Base class for client connection errors.\"\"\"\n\n\nclass ClientResponseError(ClientError):\n    \"\"\"Connection error during reading response.\n\n    request_info: instance of RequestInfo\n    \"\"\"\n\n    def __init__(self, request_info: RequestInfo,\n                 history: Tuple[ClientResponse, ...], *,\n                 status: Optional[int]=None,\n                 message: str='',\n                 headers: Optional[_CIMultiDict]=None) -> None:\n        self.request_info = request_info\n        if status is not None:\n            self.status = status\n        else:\n            self.status = 0\n        self.message = message\n        self.headers = headers\n        self.history = history\n        self.args = (request_info, history)\n\n    def __str__(self) -> str:\n        return (\"%s, message=%r, url=%r\" %\n                (self.status, self.message, self.request_info.real_url))\n\n    def __repr__(self) -> str:\n        args = \"%r, %r\" % (self.request_info, self.history)\n        if self.status != 0:\n            args += \", status=%r\" % (self.status,)\n        if self.message != '':\n            args += \", message=%r\" % (self.message,)\n        if self.headers is not None:\n            args += \", headers=%r\" % (self.headers,)\n        return \"%s(%s)\" % (type(self).__name__, args)\n\n\nclass ContentTypeError(ClientResponseError):\n    \"\"\"ContentType found is not valid.\"\"\"\n\n\nclass WSServerHandshakeError(ClientResponseError):\n    \"\"\"websocket server handshake error.\"\"\"\n\n\nclass ClientHttpProxyError(ClientResponseError):\n    \"\"\"HTTP proxy error.\n\n    Raised in :class:`aiohttp.connector.TCPConnector` if\n    proxy responds with status other than ``200 OK``\n    on ``CONNECT`` request.\n    \"\"\"\n\n\nclass TooManyRedirects(ClientResponseError):\n    \"\"\"Client was redirected too many times.\"\"\"\n\n\nclass ClientConnectionError(ClientError):\n    \"\"\"Base class for client socket errors.\"\"\"\n\n\nclass ClientOSError(ClientConnectionError, OSError):\n    \"\"\"OSError error.\"\"\"\n\n\nclass ClientConnectorError(ClientOSError):\n    \"\"\"Client connector error.\n\n    Raised in :class:`aiohttp.connector.TCPConnector` if\n        connection to proxy can not be established.\n    \"\"\"\n    def __init__(self, connection_key: ConnectionKey,\n                 os_error: OSError) -> None:\n        self._conn_key = connection_key\n        self._os_error = os_error\n        super().__init__(os_error.errno, os_error.strerror)\n        self.args = (connection_key, os_error)\n\n    @property\n    def os_error(self) -> OSError:\n        return self._os_error\n\n    @property\n    def host(self) -> str:\n        return self._conn_key.host\n\n    @property\n    def port(self) -> Optional[int]:\n        return self._conn_key.port\n\n    @property\n    def ssl(self) -> Union[SSLContext, None, bool, 'Fingerprint']:\n        return self._conn_key.ssl\n\n    def __str__(self) -> str:\n        return ('Cannot connect to host {0.host}:{0.port} ssl:{1} [{2}]'\n                .format(self, self.ssl if self.ssl is not None else 'default',\n                        self.strerror))\n\n    # OSError.__reduce__ does too much black magick\n    __reduce__ = BaseException.__reduce__\n\n\nclass ClientProxyConnectionError(ClientConnectorError):\n    \"\"\"Proxy connection error.\n\n    Raised in :class:`aiohttp.connector.TCPConnector` if\n        connection to proxy can not be established.\n    \"\"\"\n\n\nclass ServerConnectionError(ClientConnectionError):\n    \"\"\"Server connection errors.\"\"\"\n\n\nclass ServerDisconnectedError(ServerConnectionError):\n    \"\"\"Server disconnected.\"\"\"\n\n    def __init__(self, message: Optional[str]=None) -> None:\n        self.message = message\n        if message is None:\n            self.args = ()\n        else:\n            self.args = (message,)\n\n\nclass ServerTimeoutError(ServerConnectionError, asyncio.TimeoutError):\n    \"\"\"Server timeout error.\"\"\"\n\n\nclass ServerFingerprintMismatch(ServerConnectionError):\n    \"\"\"SSL certificate does not match expected fingerprint.\"\"\"\n\n    def __init__(self, expected: bytes, got: bytes,\n                 host: str, port: int) -> None:\n        self.expected = expected\n        self.got = got\n        self.host = host\n        self.port = port\n        self.args = (expected, got, host, port)\n\n    def __repr__(self) -> str:\n        return '<{} expected={!r} got={!r} host={!r} port={!r}>'.format(\n            self.__class__.__name__, self.expected, self.got,\n            self.host, self.port)\n\n\nclass ClientPayloadError(ClientError):\n    \"\"\"Response payload error.\"\"\"\n\n\nclass InvalidURL(ClientError, ValueError):\n    \"\"\"Invalid URL.\n\n    URL used for fetching is malformed, e.g. it doesn't contains host\n    part.\"\"\"\n\n    # Derive from ValueError for backward compatibility\n\n    def __init__(self, url: Any) -> None:\n        # The type of url is not yarl.URL because the exception can be raised\n        # on URL(url) call\n        super().__init__(url)\n\n    @property\n    def url(self) -> Any:\n        return self.args[0]\n\n    def __repr__(self) -> str:\n        return '<{} {}>'.format(self.__class__.__name__, self.url)\n\n\nclass ClientSSLError(ClientConnectorError):\n    \"\"\"Base error for ssl.*Errors.\"\"\"\n\n\nif ssl is not None:\n    cert_errors = (ssl.CertificateError,)\n    cert_errors_bases = (ClientSSLError, ssl.CertificateError,)\n\n    ssl_errors = (ssl.SSLError,)\n    ssl_error_bases = (ClientSSLError, ssl.SSLError)\nelse:  # pragma: no cover\n    cert_errors = tuple()\n    cert_errors_bases = (ClientSSLError, ValueError,)\n\n    ssl_errors = tuple()\n    ssl_error_bases = (ClientSSLError,)\n\n\nclass ClientConnectorSSLError(*ssl_error_bases):  # type: ignore\n    \"\"\"Response ssl error.\"\"\"\n\n\nclass ClientConnectorCertificateError(*cert_errors_bases):  # type: ignore\n    \"\"\"Response certificate error.\"\"\"\n\n    def __init__(self, connection_key:\n                 ConnectionKey, certificate_error: Exception) -> None:\n        self._conn_key = connection_key\n        self._certificate_error = certificate_error\n        self.args = (connection_key, certificate_error)\n\n    @property\n    def certificate_error(self) -> Exception:\n        return self._certificate_error\n\n    @property\n    def host(self) -> str:\n        return self._conn_key.host\n\n    @property\n    def port(self) -> Optional[int]:\n        return self._conn_key.port\n\n    @property\n    def ssl(self) -> bool:\n        return self._conn_key.is_ssl\n\n    def __str__(self) -> str:\n        return ('Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} '\n                '[{0.certificate_error.__class__.__name__}: '\n                '{0.certificate_error.args}]'.format(self))\n", "path": "aiohttp/client_exceptions.py"}]}