Skip to content

Commit

Permalink
Updated docstrings, documentation (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkittenis authored Apr 1, 2022
1 parent f9cc5ea commit 5cea5c1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions doc/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ This expands to the following per host commands:
A list of dictionaries can also be used as ``host_args`` for named argument substitution.

In the following example, first host in host list will use cmd ``echo command-1``, second host ``echo command-2`` and so on.
In the following example, first host in host list will use cmd ``echo command-0``, second host ``echo command-1`` and so on.

.. code-block:: python
Expand Down Expand Up @@ -546,7 +546,7 @@ SFTP and SCP are both supported by ``parallel-ssh`` and functions are provided b

Neither SFTP nor SCP have a shell interface and no output is sent for any SFTP/SCP commands.

As such, SFTP functions in ``ParallelSSHClient`` return greenlets that will need to be joined to raise any exceptions from them. :py:func:`gevent.joinall` may be used for that.
As such, SFTP/SCP functions in ``ParallelSSHClient`` return greenlets that will need to be joined to raise any exceptions from them. :py:func:`gevent.joinall` may be used for that.


Copying files to remote hosts in parallel
Expand Down
8 changes: 4 additions & 4 deletions pssh/clients/native/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def copy_file(self, local_file, remote_file, recurse=False, copy_args=None):
local_file and recurse is not set
:raises: :py:class:`pssh.exceptions.HostArgumentError` on number of
per-host copy arguments not equal to number of hosts
:raises: :py:class:`pss.exceptions.SFTPError` on SFTP initialisation
:raises: :py:class:`pssh.exceptions.SFTPError` on SFTP initialisation
errors
:raises: :py:class:`pssh.exceptions.SFTPIOError` on I/O errors writing
via SFTP
Expand Down Expand Up @@ -349,7 +349,7 @@ def copy_remote_file(self, remote_file, local_file, recurse=False,
local_file and recurse is not set
:raises: :py:class:`pssh.exceptions.HostArgumentError` on number of
per-host copy arguments not equal to number of hosts
:raises: :py:class:`pss.exceptions.SFTPError` on SFTP initialisation
:raises: :py:class:`pssh.exceptions.SFTPError` on SFTP initialisation
errors
:raises: :py:class:`pssh.exceptions.SFTPIOError` on I/O errors reading
from SFTP
Expand Down Expand Up @@ -410,7 +410,7 @@ def scp_send(self, local_file, remote_file, recurse=False, copy_args=None):
:rtype: list(:py:class:`gevent.Greenlet`) of greenlets for remote copy
commands.
:raises: :py:class:`pss.exceptions.SCPError` on errors copying file.
:raises: :py:class:`pssh.exceptions.SCPError` on errors copying file.
:raises: :py:class:`OSError` on local OS errors like permission denied.
"""
copy_args = [{'local_file': local_file,
Expand Down Expand Up @@ -482,7 +482,7 @@ def scp_recv(self, remote_file, local_file, recurse=False, copy_args=None,
local_file and recurse is not set.
:raises: :py:class:`pssh.exceptions.HostArgumentError` on number of
per-host copy arguments not equal to number of hosts.
:raises: :py:class:`pss.exceptions.SCPError` on errors copying file.
:raises: :py:class:`pssh.exceptions.SCPError` on errors copying file.
:raises: :py:class:`OSError` on local OS errors like permission denied.
.. note ::
Expand Down
6 changes: 3 additions & 3 deletions pssh/clients/native/single.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def copy_file(self, local_file, remote_file, recurse=False, sftp=None):
:raises: :py:class:`ValueError` when a directory is supplied to
``local_file`` and ``recurse`` is not set
:raises: :py:class:`pss.exceptions.SFTPError` on SFTP initialisation
:raises: :py:class:`pssh.exceptions.SFTPError` on SFTP initialisation
errors
:raises: :py:class:`pssh.exceptions.SFTPIOError` on I/O errors writing
via SFTP
Expand Down Expand Up @@ -487,7 +487,7 @@ def copy_remote_file(self, remote_file, local_file, recurse=False,
:raises: :py:class:`ValueError` when a directory is supplied to
``local_file`` and ``recurse`` is not set
:raises: :py:class:`pss.exceptions.SFTPError` on SFTP initialisation
:raises: :py:class:`pssh.exceptions.SFTPError` on SFTP initialisation
errors
:raises: :py:class:`pssh.exceptions.SFTPIOError` on I/O errors reading
from SFTP
Expand Down Expand Up @@ -619,7 +619,7 @@ def scp_send(self, local_file, remote_file, recurse=False, sftp=None):
:raises: :py:class:`ValueError` when a directory is supplied to
``local_file`` and ``recurse`` is not set
:raises: :py:class:`pss.exceptions.SFTPError` on SFTP initialisation
:raises: :py:class:`pssh.exceptions.SFTPError` on SFTP initialisation
errors
:raises: :py:class:`pssh.exceptions.SFTPIOError` on I/O errors writing
via SFTP
Expand Down

0 comments on commit 5cea5c1

Please sign in to comment.