diff options
| -rw-r--r-- | meta/lib/oeqa/core/target/ssh.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py index 1cd496c2f4..a9566d9bd6 100644 --- a/meta/lib/oeqa/core/target/ssh.py +++ b/meta/lib/oeqa/core/target/ssh.py | |||
| @@ -262,7 +262,6 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
| 262 | time.sleep(5) | 262 | time.sleep(5) |
| 263 | try: | 263 | try: |
| 264 | process.kill() | 264 | process.kill() |
| 265 | process.wait() | ||
| 266 | except OSError: | 265 | except OSError: |
| 267 | logger.debug('OSError when killing process') | 266 | logger.debug('OSError when killing process') |
| 268 | pass | 267 | pass |
| @@ -271,6 +270,7 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
| 271 | " running time: %d seconds." % (timeout, endtime)) | 270 | " running time: %d seconds." % (timeout, endtime)) |
| 272 | logger.debug('Received data from SSH call:\n%s ' % lastline) | 271 | logger.debug('Received data from SSH call:\n%s ' % lastline) |
| 273 | output += lastline | 272 | output += lastline |
| 273 | process.wait() | ||
| 274 | 274 | ||
| 275 | else: | 275 | else: |
| 276 | output_raw = process.communicate()[0] | 276 | output_raw = process.communicate()[0] |
| @@ -285,10 +285,10 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
| 285 | except TimeoutExpired: | 285 | except TimeoutExpired: |
| 286 | try: | 286 | try: |
| 287 | process.kill() | 287 | process.kill() |
| 288 | process.wait() | ||
| 289 | except OSError: | 288 | except OSError: |
| 290 | logger.debug('OSError') | 289 | logger.debug('OSError') |
| 291 | pass | 290 | pass |
| 291 | process.wait() | ||
| 292 | 292 | ||
| 293 | options = { | 293 | options = { |
| 294 | "stdout": subprocess.PIPE, | 294 | "stdout": subprocess.PIPE, |
| @@ -315,6 +315,7 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
| 315 | # whilst running and ensure we don't leave a process behind. | 315 | # whilst running and ensure we don't leave a process behind. |
| 316 | if process.poll() is None: | 316 | if process.poll() is None: |
| 317 | process.kill() | 317 | process.kill() |
| 318 | if process.returncode == None: | ||
| 318 | process.wait() | 319 | process.wait() |
| 319 | logger.debug('Something went wrong, killing SSH process') | 320 | logger.debug('Something went wrong, killing SSH process') |
| 320 | raise | 321 | raise |
