diff options
| -rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 7273bbc3db..277cd32848 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
| @@ -630,8 +630,12 @@ class QemuRunner: | |||
| 630 | # so it's possible that the file has been created but the content is empty | 630 | # so it's possible that the file has been created but the content is empty |
| 631 | pidfile_timeout = time.time() + 3 | 631 | pidfile_timeout = time.time() + 3 |
| 632 | while time.time() < pidfile_timeout: | 632 | while time.time() < pidfile_timeout: |
| 633 | with open(self.qemu_pidfile, 'r') as f: | 633 | try: |
| 634 | qemu_pid = f.read().strip() | 634 | with open(self.qemu_pidfile, 'r') as f: |
| 635 | qemu_pid = f.read().strip() | ||
| 636 | except FileNotFoundError: | ||
| 637 | # Can be used to detect shutdown so the pid file can disappear | ||
| 638 | return False | ||
| 635 | # file created but not yet written contents | 639 | # file created but not yet written contents |
| 636 | if not qemu_pid: | 640 | if not qemu_pid: |
| 637 | time.sleep(0.5) | 641 | time.sleep(0.5) |
