Skip to content

Commit c7fc51a

Browse files
authored
Rdme (#358)
* Changelog syntax changes * Updated setup.py dependencies * Updated docstrings
1 parent d812ff3 commit c7fc51a

File tree

6 files changed

+118
-58
lines changed

6 files changed

+118
-58
lines changed

Changelog.rst

Lines changed: 108 additions & 51 deletions
Large diffs are not rendered by default.

pssh/clients/base/parallel.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def __del__(self):
118118
self.disconnect()
119119

120120
def disconnect(self):
121+
"""Disconnect all clients."""
121122
if not hasattr(self, '_host_clients'):
122123
return
123124
for s_client in self._host_clients.values():
@@ -126,7 +127,6 @@ def disconnect(self):
126127
except Exception as ex:
127128
logger.debug("Client disconnect failed with %s", ex)
128129
pass
129-
del s_client
130130

131131
def _check_host_config(self):
132132
if self.host_config is None:
@@ -266,7 +266,7 @@ def get_last_output(self, cmds=None):
266266
:param cmds: Commands to get output for. Defaults to ``client.cmds``
267267
:type cmds: list(:py:class:`gevent.Greenlet`)
268268
269-
:rtype: dict or list
269+
:rtype: list(:py:class:`pssh.output.HostOutput`)
270270
"""
271271
cmds = self.cmds if cmds is None else cmds
272272
if cmds is None:
@@ -290,7 +290,6 @@ def _get_host_config(self, host_i):
290290
gssapi_server_identity=self.gssapi_server_identity,
291291
gssapi_client_identity=self.gssapi_client_identity,
292292
gssapi_delegate_credentials=self.gssapi_delegate_credentials,
293-
alias=None,
294293
)
295294
return config
296295
config = self.host_config[host_i]

pssh/clients/native/single.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ def _send_keepalive(self):
213213
sleep(self._eagain(self.session.keepalive_send))
214214

215215
def configure_keepalive(self):
216+
"""Configures keepalive on the server for `self.keepalive_seconds`."""
216217
self.session.keepalive_config(False, self.keepalive_seconds)
217218

218219
def _init_session(self, retries=1):
@@ -266,7 +267,10 @@ def _open_session(self):
266267
return chan
267268

268269
def open_session(self):
269-
"""Open new channel from session"""
270+
"""Open new channel from session.
271+
272+
:rtype: :py:class:`ssh2.channel.Channel`
273+
"""
270274
try:
271275
chan = self._open_session()
272276
except Exception as ex:

pssh/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(self, user=None, port=None, password=None, private_key=None,
5959
:param allow_agent: Enable/disable SSH agent authentication.
6060
:type allow_agent: bool
6161
:param alias: Use an alias for this host.
62-
:type alias: str or int
62+
:type alias: str
6363
:param num_retries: Number of retry attempts before giving up on connection
6464
and SSH operations.
6565
:type num_retries: int

pssh/output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def __init__(self, host, channel, stdin,
7070
:param stdin: Standard input buffer
7171
:type stdin: :py:func:`file`-like object
7272
:param client: `SSHClient` output is coming from.
73-
:type client: :py:class:`pssh.clients.base.single.BaseSSHClient`
73+
:type client: :py:class:`pssh.clients.base.single.BaseSSHClient` or `None`.
7474
:param alias: Host alias.
7575
:type alias: str
7676
:param exception: Exception from host if any

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
'*.tests', '*.tests.*')
3636
),
3737
install_requires=[
38-
'gevent>=1.3.0', 'ssh2-python', 'ssh-python'],
38+
'gevent', 'ssh2-python', 'ssh-python'],
3939
classifiers=[
4040
'Development Status :: 5 - Production/Stable',
4141
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',

0 commit comments

Comments
 (0)