summaryrefslogtreecommitdiff
path: root/pygerrit
diff options
context:
space:
mode:
Diffstat (limited to 'pygerrit')
-rw-r--r--pygerrit/client.py4
-rw-r--r--pygerrit/ssh.py5
2 files changed, 9 insertions, 0 deletions
diff --git a/pygerrit/client.py b/pygerrit/client.py
index 456ce2e..a5a27c4 100644
--- a/pygerrit/client.py
+++ b/pygerrit/client.py
@@ -47,6 +47,10 @@ class GerritClient(object):
""" Return the version of Gerrit that is connected to. """
return self._ssh_client.get_remote_version()
+ def gerrit_info(self):
+ """ Return the username, and version of Gerrit that is connected to. """
+ return self._ssh_client.get_remote_info()
+
def query(self, term):
""" Run `gerrit query` with the given `term`.
diff --git a/pygerrit/ssh.py b/pygerrit/ssh.py
index e779715..2933ddf 100644
--- a/pygerrit/ssh.py
+++ b/pygerrit/ssh.py
@@ -147,6 +147,11 @@ class GerritSSHClient(SSHClient):
self.remote_version = _extract_version(version_string, pattern)
return self.remote_version
+ def get_remote_info(self):
+ """ Return the username, and version of the remote Gerrit server. """
+ version = self.get_remote_version()
+ return (self.username, version)
+
def run_gerrit_command(self, command):
""" Run the given command.