@@ -216,9 +216,9 @@ class ParallelSSHClient(object):
216216 """Uses :mod:`pssh.SSHClient`, performs tasks over SSH on multiple hosts in \
217217 parallel.
218218
219- Connections to hosts are established in parallel when an object of this class \
220- is created, therefor any connection and/or authentication failures will happen \
221- on creation and need to be caught."""
219+ Connections to hosts are established in parallel when an object of this
220+ class is created, therefor any connection and/or authentication exceptions \
221+ will happen on creation and need to be caught."""
222222
223223 def __init__ (self , hosts ,
224224 user = None , password = None , port = None , pkey = None ,
@@ -272,12 +272,12 @@ def __init__(self, hosts,
272272 >>> cmds = client.exec_command('ls -ltrh /tmp/aasdfasdf', sudo = True)
273273 >>> output = [client.get_stdout(cmd, return_buffers=True) for cmd in cmds]
274274 >>> print output
275- [{'myhost1': {'exit_code': 2} ,
275+ [{'myhost1': {'exit_code': 2,
276276 'stdout' : <generator object <genexpr>,
277- 'stderr' : <generator object <genexpr>},
278- {'myhost2': {'exit_code': 2}
277+ 'stderr' : <generator object <genexpr>,} },
278+ {'myhost2': {'exit_code': 2,
279279 'stdout' : <generator object <genexpr>,
280- 'stderr' : <generator object <genexpr>},
280+ 'stderr' : <generator object <genexpr>,} },
281281 ]
282282 >>> for host_stdout in output:
283283 ... for line in host_stdout[host_output.keys()[0]]['stdout']:
@@ -361,7 +361,7 @@ def _exec_command(self, host, *args, **kwargs):
361361 return self .host_clients [host ].exec_command (* args , ** kwargs )
362362
363363 def get_stdout (self , greenlet , return_buffers = False ):
364- """Print stdout from greenlet and return exit code for host
364+ """Get/print stdout from greenlet and return exit code for host
365365
366366 :mod:`pssh.get_stdout` will close the open SSH channel but this does
367367 **not** close the established connection to the remote host, only the
@@ -371,8 +371,8 @@ def get_stdout(self, greenlet, return_buffers=False):
371371 connections.
372372
373373 By default, stdout and stderr will be logged via the logger named \
374- `host_logger` unless return_buffers is set to True in which case \
375- both buffers are returned along with the exit status.
374+ `` host_logger`` unless `` return_buffers`` is set to `` True`` in which case \
375+ both buffers are instead returned along with the exit status.
376376
377377 :param greenlet: Greenlet object containing an \
378378 SSH channel reference, hostname, stdout and stderr buffers
@@ -384,9 +384,9 @@ def get_stdout(self, greenlet, return_buffers=False):
384384
385385 :rtype: Dictionary containing ``{host: {'exit_code': exit code}}`` entry \
386386 for example ``{'myhost1': {'exit_code': 0}}``
387- :rtype: With return_buffers=True: ``{'myhost1': {'exit_code': 0} ,
388- 'stdout' : <iterable>,
389- 'stderr' : <iterable>}``
387+ :rtype: With `` return_buffers=True`` : ``{'myhost1': {'exit_code': 0,
388+ 'stdout' : <iterable>,
389+ 'stderr' : <iterable>,} }``
390390 """
391391 channel , host , _stdout , _stderr = greenlet .get ()
392392 stdout = (line .strip () for line in _stdout )
0 commit comments