summaryrefslogtreecommitdiff
path: root/poky/meta/lib/oeqa/core/target/ssh.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/lib/oeqa/core/target/ssh.py')
-rw-r--r--poky/meta/lib/oeqa/core/target/ssh.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/poky/meta/lib/oeqa/core/target/ssh.py b/poky/meta/lib/oeqa/core/target/ssh.py
index 51079075b5..a9566d9bd6 100644
--- a/poky/meta/lib/oeqa/core/target/ssh.py
+++ b/poky/meta/lib/oeqa/core/target/ssh.py
@@ -250,6 +250,9 @@ def SSHCall(command, logger, timeout=None, **opts):
except InterruptedError:
logger.debug('InterruptedError')
continue
+ except BlockingIOError:
+ logger.debug('BlockingIOError')
+ continue
process.stdout.close()
@@ -267,6 +270,7 @@ def SSHCall(command, logger, timeout=None, **opts):
" running time: %d seconds." % (timeout, endtime))
logger.debug('Received data from SSH call:\n%s ' % lastline)
output += lastline
+ process.wait()
else:
output_raw = process.communicate()[0]
@@ -284,6 +288,7 @@ def SSHCall(command, logger, timeout=None, **opts):
except OSError:
logger.debug('OSError')
pass
+ process.wait()
options = {
"stdout": subprocess.PIPE,
@@ -310,6 +315,8 @@ def SSHCall(command, logger, timeout=None, **opts):
# whilst running and ensure we don't leave a process behind.
if process.poll() is None:
process.kill()
+ if process.returncode == None:
+ process.wait()
logger.debug('Something went wrong, killing SSH process')
raise