Skip to content

Commit 8260638

Browse files
Danpkittenis
authored andcommitted
Updated docstrings
1 parent 61d0147 commit 8260638

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

pssh/pssh_client.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,8 @@ def copy_file(self, local_file, remote_file, recurse=False):
814814
This function returns a list of greenlets which can be
815815
`join`ed on to wait for completion.
816816
817+
:mod:`gevent.joinall` function may be used to join on all greenlets.
818+
817819
Use `.get` on each greenlet to raise any exceptions from them.
818820
819821
Exceptions listed here are raised when `.get` is called on each
@@ -851,7 +853,17 @@ def _copy_file(self, host, local_file, remote_file, recurse=False):
851853

852854
def copy_remote_file(self, remote_file, local_file, recurse=False,
853855
suffix_separator='_'):
854-
"""Copy remote file to local file in parallel
856+
"""Copy remote file(s) in parallel
857+
858+
This function, like :mod:`ParallelSSHClient.copy_file`, returns a list
859+
of greenlets which can be `join`ed on to wait for completion.
860+
861+
:mod:`gevent.joinall` function may be used to join on all greenlets.
862+
863+
Use `.get` on each greenlet to raise any exceptions from them.
864+
865+
Exceptions listed here are raised when `.get` is called on each
866+
greenlet, not this function itself.
855867
856868
:param remote_file: remote filepath to copy to local host
857869
:type remote_file: str
@@ -860,9 +872,9 @@ def copy_remote_file(self, remote_file, local_file, recurse=False,
860872
:param recurse: whether or not to recurse
861873
:type recurse: bool
862874
:param suffix_separator: (Optional) Separator string between \
863-
filename and host, defaults to ``_``. Eg for a ``local_file`` value of \
864-
``my_file`` and default seaparator the resulting filename will be \
865-
``my_file_my_host`` for the file from host ``my_host``
875+
filename and host, defaults to ``_``. For example, for a ``local_file`` \
876+
value of ``my_file`` and default separator the resulting filename will \
877+
be ``my_file_my_host`` for the file from host ``my_host``
866878
:type suffix_separator: str
867879
.. note ::
868880
Local directories in `local_file` that do not exist will be

0 commit comments

Comments
 (0)