Skip to content

Commit 8a9f634

Browse files
author
Dan
committed
Update docstrings. Change imports to fix thread exception on exit regression. Updated readme with google group link.
1 parent cdf23ac commit 8a9f634

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

README.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Frequently asked questions
7979
Can ParallelSSH forward my SSH agent?
8080

8181
:A:
82-
SSH agent forwarding, what `ssh -A` does on the command line, is supported and enabled by default. Creating an object as `ParallelSSH(forward_ssh_agent=False)` will disable that behaviour.
82+
SSH agent forwarding, what `ssh -A` does on the command line, is supported and enabled by default. Creating an object as `ParallelSSHClient(forward_ssh_agent=False)` will disable that behaviour.
8383

8484
:Q:
8585
Is proxying supported?
@@ -102,6 +102,11 @@ Frequently asked questions
102102
>>> client_key = paramiko.RSAKey.from_private_key_file('user.key')
103103
>>> client = ParallelSSHClient(['myhost1', 'myhost2'], pkey=client_key)
104104

105+
:Q:
106+
Is there a user's group for feedback and discussion about ParallelSSH?
107+
:A:
108+
There is a public `ParallelSSH Google group <https://groups.google.com/forum/#!forum/parallelssh>`_ setup for this purpose - both posting and viewing are open to the public.
109+
105110
********
106111
SFTP/SCP
107112
********

pssh.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
See :mod:`pssh.ParallelSSHClient` and :mod:`pssh.SSHClient` for class documentation.
2929
"""
3030

31+
from gevent import monkey
32+
monkey.patch_all()
33+
import gevent.pool
3134
import warnings
3235
from socket import gaierror as sock_gaierror, error as sock_error
3336
import logging
3437
import paramiko
3538
import os
36-
import gevent.pool
37-
from gevent import monkey
38-
monkey.patch_all()
3939

4040
host_logger = logging.getLogger('host_logger')
4141
handler = logging.StreamHandler()
@@ -228,7 +228,7 @@ def exec_command(self, command, sudo=False, user=None, **kwargs):
228228
command = 'bash -c "%s"' % command.replace('"', '\\"')
229229
logger.debug("Running command %s on %s", command, self.host)
230230
channel.exec_command(command, **kwargs)
231-
logger.debug("Command finished executing")
231+
logger.debug("Command started")
232232
while not (channel.recv_ready() or channel.closed):
233233
gevent.sleep(.2)
234234
return channel, self.host, stdout, stderr
@@ -357,7 +357,7 @@ def __init__(self, hosts,
357357
'cmd' : <greenlet>,
358358
}}
359359
>>> # Print output as it comes in.
360-
>>> for host in output: print output[host]['stdout']
360+
>>> for host in output: for line in output[host]['stdout']: print line
361361
[myhost1] ls: cannot access /tmp/aasdfasdf: No such file or directory
362362
[myhost2] ls: cannot access /tmp/aasdfasdf: No such file or directory
363363
>>> # Retrieve exit code after commands have finished

0 commit comments

Comments
 (0)