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 72ed1adbf8..f22836d390 100644 --- a/meta/lib/oeqa/core/target/ssh.py +++ b/meta/lib/oeqa/core/target/ssh.py | |||
| @@ -265,7 +265,6 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
| 265 | time.sleep(5) | 265 | time.sleep(5) |
| 266 | try: | 266 | try: |
| 267 | process.kill() | 267 | process.kill() |
| 268 | process.wait() | ||
| 269 | except OSError: | 268 | except OSError: |
| 270 | logger.debug('OSError when killing process') | 269 | logger.debug('OSError when killing process') |
| 271 | pass | 270 | pass |
| @@ -274,6 +273,7 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
| 274 | " running time: %d seconds." % (timeout, endtime)) | 273 | " running time: %d seconds." % (timeout, endtime)) |
| 275 | logger.debug('Received data from SSH call:\n%s ' % lastline) | 274 | logger.debug('Received data from SSH call:\n%s ' % lastline) |
| 276 | output += lastline | 275 | output += lastline |
| 276 | process.wait() | ||
| 277 | 277 | ||
| 278 | else: | 278 | else: |
| 279 | output_raw = process.communicate()[0] | 279 | output_raw = process.communicate()[0] |
| @@ -288,10 +288,10 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
| 288 | except TimeoutExpired: | 288 | except TimeoutExpired: |
| 289 | try: | 289 | try: |
| 290 | process.kill() | 290 | process.kill() |
| 291 | process.wait() | ||
| 292 | except OSError: | 291 | except OSError: |
| 293 | logger.debug('OSError') | 292 | logger.debug('OSError') |
| 294 | pass | 293 | pass |
| 294 | process.wait() | ||
| 295 | 295 | ||
| 296 | options = { | 296 | options = { |
| 297 | "stdout": subprocess.PIPE, | 297 | "stdout": subprocess.PIPE, |
| @@ -318,6 +318,7 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
| 318 | # whilst running and ensure we don't leave a process behind. | 318 | # whilst running and ensure we don't leave a process behind. |
| 319 | if process.poll() is None: | 319 | if process.poll() is None: |
| 320 | process.kill() | 320 | process.kill() |
| 321 | if process.returncode == None: | ||
| 321 | process.wait() | 322 | process.wait() |
| 322 | logger.debug('Something went wrong, killing SSH process') | 323 | logger.debug('Something went wrong, killing SSH process') |
| 323 | raise | 324 | raise |
