aboutsummaryrefslogtreecommitdiff
path: root/lava_dispatcher/shell.py
diff options
context:
space:
mode:
authorNeil Williams <neil.williams@linaro.org>2017-11-29 09:59:52 +0000
committerNeil Williams <neil.williams@linaro.org>2017-11-30 10:59:38 +0000
commitc20269b945a7d80383965cb62d99c32259bbb263 (patch)
treeb6073c00ee250d92583560a2bea9a477a8b97eb6 /lava_dispatcher/shell.py
parentb5ebe130e51e505d1eb24558cc82e47979a24cfd (diff)
Prevent crash if logfile is None in shell.
https://staging.validation.linaro.org/scheduler/job/202322#L1126 Change-Id: I2068405054d2f01d319dd51b194b9ff992cd1400
Diffstat (limited to 'lava_dispatcher/shell.py')
-rw-r--r--lava_dispatcher/shell.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lava_dispatcher/shell.py b/lava_dispatcher/shell.py
index a2ae67e35..92547a467 100644
--- a/lava_dispatcher/shell.py
+++ b/lava_dispatcher/shell.py
@@ -265,6 +265,9 @@ class ShellSession(Connection):
Returns the number of characters read.
"""
index = 0
+ if not self.raw_connection:
+ # connection has already been closed.
+ return index
if timeout < 0:
raise LAVABug("Invalid timeout value passed to listen_feedback()")
try: