diff options
| author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-10-23 20:51:36 +0900 |
|---|---|---|
| committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-10-24 11:01:21 +0900 |
| commit | 9930c04fa5045516da8b9a5e82e2f26cfff7f2a0 (patch) | |
| tree | 59200f33c2f8e594e32721e2f09ace1b2159de8d /pygerrit/client.py | |
| parent | b361460cee9138a0bd6d541e35d93747097f4c85 (diff) | |
| download | pygerrit-9930c04fa5045516da8b9a5e82e2f26cfff7f2a0.tar.gz | |
Encapsulate the SSH command results in a class
Add a new class GerritSSHCommandResult to encapsulate the stdin,
stdout, and stderr streams that are returned from running a
command over SSH.
Change-Id: Ic851c195ac63e530e62198eb7e0af62c2fbd73d5
Diffstat (limited to 'pygerrit/client.py')
| -rw-r--r-- | pygerrit/client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygerrit/client.py b/pygerrit/client.py index cb32b50..2015b06 100644 --- a/pygerrit/client.py +++ b/pygerrit/client.py @@ -62,9 +62,9 @@ class GerritClient(object): command += [escape_string(" ".join(term))] else: command += [escape_string(term)] - _stdin, stdout, _stderr = self._ssh_client.run_gerrit_command(command) + result = self._ssh_client.run_gerrit_command(command) decoder = JSONDecoder() - for line in stdout.read().splitlines(): + for line in result.stdout.read().splitlines(): # Gerrit's response to the query command contains one or more # lines of JSON-encoded strings. The last one is a status # dictionary containing the key "type" whose value indicates |
