Skip to content

Commit ad6a9b4

Browse files
author
Pan
committed
Updated docs
1 parent 56db95f commit ad6a9b4

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

doc/advanced.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ In some cases, such as when the remote command never terminates unless interrupt
192192
193193
Without a PTY, the ``join`` will complete but the remote process will be left running as per SSH protocol specifications.
194194

195-
Output reading and Timeouts
196-
______________________________
197-
198195
Furthermore, once reading output has timed out, it is necessary to restart the output generators as by Python design they only iterate once. This can be done as follows:
199196

200197
.. code-block:: python
@@ -283,18 +280,18 @@ Command can also have multiple arguments to be substituted.
283280
.. code-block:: python
284281
285282
output = client.run_command('%s %s',
286-
host_args=(('host1_cmd1', 'host1_cmd2'),
287-
('host2_cmd1', 'host2_cmd2'),
288-
('host3_cmd1', 'host3_cmd2'),))
283+
host_args = (('host1_cmd1', 'host1_cmd2'),
284+
('host2_cmd1', 'host2_cmd2'),
285+
('host3_cmd1', 'host3_cmd2'),))
289286
290287
A list of dictionaries can also be used as ``host_args`` for named argument substitution.
291288

292289
In the following example, first host in host list will use cmd ``host-index-0``, second host ``host-index-1`` and so on.
293290

294291
.. code-block:: python
295292
296-
host_args=[{'cmd': 'host-index-%s' % (i,))
297-
for i in range(len(client.hosts))]
293+
host_args = [{'cmd': 'host-index-%s' % (i,)}
294+
for i in range(len(client.hosts))]
298295
output = client.run_command('%(cmd)s', host_args=host_args)
299296
300297

0 commit comments

Comments
 (0)