summaryrefslogtreecommitdiff
path: root/pygerrit/stream.py
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2012-10-23 20:51:36 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2012-10-24 11:01:21 +0900
commit9930c04fa5045516da8b9a5e82e2f26cfff7f2a0 (patch)
tree59200f33c2f8e594e32721e2f09ace1b2159de8d /pygerrit/stream.py
parentb361460cee9138a0bd6d541e35d93747097f4c85 (diff)
downloadpygerrit-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/stream.py')
-rw-r--r--pygerrit/stream.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygerrit/stream.py b/pygerrit/stream.py
index ba9525b..41572ce 100644
--- a/pygerrit/stream.py
+++ b/pygerrit/stream.py
@@ -70,12 +70,12 @@ class GerritStream(Thread):
def run(self):
""" Listen to the stream and send events to the client. """
try:
- _stdin, stdout, _stderr = \
- self._ssh_client.run_gerrit_command("stream-events")
+ result = self._ssh_client.run_gerrit_command("stream-events")
except GerritError, e:
self._error_event(e)
poller = poll()
+ stdout = result.stdout
poller.register(stdout.channel)
while not self._stop.is_set():
data = poller.poll()