summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2023-01-20 21:29:12 -0500
committerJeff Forcier <jeff@bitprophet.org>2023-01-20 21:29:13 -0500
commit45de33414fbd253262d8d7135e58427255c5fc5f (patch)
treeea282cb2dcf3db995ac6f04d12846f487f5b7b4c
parenta28699fad0066223ea4af826c4ec1b5829df4b73 (diff)
downloadparamiko-45de33414fbd253262d8d7135e58427255c5fc5f.tar.gz
Massage SSHClient.connect exception-raising docstring
- Sphinx Python domain can link to non-stdlib exception classes inside the `:raises:` fieldlist now! yay!! - Add explicit mention of 'can raise NoValidConnectionsError', which was never added when the latter was created. Was still technically correct (it is a subclass of socket.error) but that is not the best kind of correct, after all.
-rw-r--r--paramiko/client.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/paramiko/client.py b/paramiko/client.py
index 5667d7e7..e9bcfb56 100644
--- a/paramiko/client.py
+++ b/paramiko/client.py
@@ -321,14 +321,19 @@ class SSHClient(ClosingContextManager):
`.Transport` instance to be used by this client. Defaults to
`.Transport.__init__`.
- :raises:
- `.BadHostKeyException` -- if the server's host key could not be
- verified
- :raises: `.AuthenticationException` -- if authentication failed
- :raises:
- `.SSHException` -- if there was any other error connecting or
- establishing an SSH session
- :raises socket.error: if a socket error occurred while connecting
+ :raises BadHostKeyException:
+ if the server's host key could not be verified.
+ :raises AuthenticationException: if authentication failed.
+ :raises socket.error:
+ if a socket error (other than connection-refused or
+ host-unreachable) occurred while connecting.
+ :raises NoValidConnectionsError:
+ if all valid connection targets for the requested hostname (eg IPv4
+ and IPv6) yielded connection-refused or host-unreachable socket
+ errors.
+ :raises SSHException:
+ if there was any other error connecting or establishing an SSH
+ session.
.. versionchanged:: 1.15
Added the ``banner_timeout``, ``gss_auth``, ``gss_kex``,