Skip to content

Commit bc0e018

Browse files
author
Dan
committed
Updated docstrings, fix typo
1 parent 9afc944 commit bc0e018

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pssh.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def __init__(self, hosts,
431431
# To hold host clients
432432
self.host_clients = dict((host, None) for host in hosts)
433433

434-
def run_command(self, *args, sudo=False, **kwargs):
434+
def run_command(self, *args, **kwargs):
435435
"""Run command on all hosts in parallel, honoring self.pool_size,
436436
and return output buffers.
437437
@@ -471,6 +471,10 @@ def run_command(self, *args, sudo=False, **kwargs):
471471
Wait for completion, no stdout:
472472
473473
>>> client.pool.join()
474+
475+
Run with sudo:
476+
477+
>>> output = client.run_command('ls -ltrh', sudo=True)
474478
475479
Capture stdout - **WARNING** - this will store the entirety of stdout
476480
into memory and may exhaust available memory if command output is

0 commit comments

Comments
 (0)