diff options
| author | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-11-06 20:09:50 +0900 |
|---|---|---|
| committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-11-07 18:51:48 +0900 |
| commit | d47a4bc16d5a4aa23ce55a75bd4ef117425a5ed7 (patch) | |
| tree | f3a671dc45d4b49d884437363e4f74d46a63b4f8 /pygerrit/client.py | |
| parent | d7d9e95768aaeca99625e1876f1f75702812e54a (diff) | |
| download | pygerrit-d47a4bc16d5a4aa23ce55a75bd4ef117425a5ed7.tar.gz | |
Add method to get username and Gerrit version
If the username is not given in the constructor, it is detected
from the ssh config.
Add a method that allows the client to get the detected username
that was used to connect to Gerrit.
Change-Id: I15747d1446b07ce6b250f294fe72842a1be50a6c
Diffstat (limited to 'pygerrit/client.py')
| -rw-r--r-- | pygerrit/client.py | 4 |
1 files changed, 4 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`. |
