aboutsummaryrefslogtreecommitdiff
path: root/lava_dispatcher/connection.py
diff options
context:
space:
mode:
authorMichael Hudson-Doyle <michael.hudson@linaro.org>2011-10-26 16:24:05 +1300
committerMichael Hudson-Doyle <michael.hudson@linaro.org>2011-10-26 16:24:05 +1300
commit93467a3302c2145abf05a88624066aa5d013445c (patch)
tree4cff94f6549e620734bb26584104beb35598518c /lava_dispatcher/connection.py
parent28d14616dfa40092e9f5fa79da06a7cbafc3ca73 (diff)
fix ridiculous bugs
Diffstat (limited to 'lava_dispatcher/connection.py')
-rw-r--r--lava_dispatcher/connection.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/lava_dispatcher/connection.py b/lava_dispatcher/connection.py
index 976572643..749a61c41 100644
--- a/lava_dispatcher/connection.py
+++ b/lava_dispatcher/connection.py
@@ -29,9 +29,9 @@ class LavaConnection(object):
def __init__(self, device_config, sio):
self.device_config = device_config
- self.proc = self._make_connection()
+ self.proc = self._make_connection(sio)
- def _make_connection(self):
+ def _make_connection(self, sio):
raise NotImplementedError(self._make_connection)
def device_option(self, option_name):
@@ -75,13 +75,14 @@ class LavaConnection(object):
raise NotImplementedError(self.hard_reboot)
-class LavaConmuxConnection(object):
+class LavaConmuxConnection(LavaConnection):
def _make_connection(self, sio):
cmd = "conmux-console %s" % self.device_option("hostname")
- self.proc = pexpect.spawn(cmd, timeout=3600, logfile=sio)
+ proc = pexpect.spawn(cmd, timeout=3600, logfile=sio)
#serial can be slow, races do funny things if you don't increase delay
- self.proc.delaybeforesend=1
+ proc.delaybeforesend=1
+ return proc
def hard_reboot(self):
self.proc.send("~$")