python/qemu/qtest: Check before accessing _qtest
commitc95dddce4910c9cd5315b942180b03ca4e48a6a6
authorJohn Snow <jsnow@redhat.com>
Thu, 14 May 2020 05:54:00 +0000 (14 01:54 -0400)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Sun, 31 May 2020 16:25:31 +0000 (31 18:25 +0200)
treeb91ed748056c060d45638cda74a47a7ac818be2a
parentde210ec53c842fa67aa10110a7a351d64f91c487
python/qemu/qtest: Check before accessing _qtest

It can be None; so add assertions or exceptions where appropriate to
guard the access accordingly.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200514055403.18902-30-jsnow@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
python/qemu/qtest.py