diff options
Diffstat (limited to 'lava_dispatcher/connection.py')
-rw-r--r-- | lava_dispatcher/connection.py | 11 |
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("~$") |