summaryrefslogtreecommitdiff
path: root/pygerrit/ssh.py
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2013-08-06 16:28:49 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2013-08-06 18:02:48 +0900
commit648f2381b5fc91f8430e45a69dd64175dc913726 (patch)
tree789301858dc53980c981744c846ce0176f239ee3 /pygerrit/ssh.py
parent5eaff32cedf72647636e23436dde660d6323943c (diff)
downloadpygerrit-648f2381b5fc91f8430e45a69dd64175dc913726.tar.gz
Fix pylint warnings
- Add missing docstrings that the PEP-257 checker did not report. - Add explicit parameters on `GerritSSHClient.exec_command` method overridden from `paramiko.SSHClient.exec_command`. - Disable warning that the `GerritEvent` class does not have a member named `name`. This member is initialised by the event factory when a derived class is instantiated. - Capitalise constant `REQUIRES`. Change-Id: I8880e061b51e12145ee55e0cd86dab930970cde5
Diffstat (limited to 'pygerrit/ssh.py')
-rw-r--r--pygerrit/ssh.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pygerrit/ssh.py b/pygerrit/ssh.py
index d65ae93..9cee8a1 100644
--- a/pygerrit/ssh.py
+++ b/pygerrit/ssh.py
@@ -74,6 +74,7 @@ class GerritSSHClient(SSHClient):
self.connected = False
def _connect(self):
+ """ Connect to the remote if not already connected. """
if self.connected:
return
self.load_system_host_keys()
@@ -115,7 +116,7 @@ class GerritSSHClient(SSHClient):
except AttributeError:
self.remote_version = None
- def exec_command(self, command, bufsize=1):
+ def exec_command(self, command, bufsize=1, timeout=None, get_pty=False):
""" Execute the command.
Make sure we're connected and then execute the command.
@@ -124,7 +125,8 @@ class GerritSSHClient(SSHClient):
"""
self._connect()
- return super(GerritSSHClient, self).exec_command(command, bufsize)
+ return super(GerritSSHClient, self).\
+ exec_command(command, bufsize, timeout, get_pty)
def get_remote_version(self):
""" Return the version of the remote Gerrit server. """