OSDN Git Service

python/qemu/qmp: assert sockfile is not None
authorJohn Snow <jsnow@redhat.com>
Thu, 14 May 2020 05:53:51 +0000 (01:53 -0400)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Sun, 31 May 2020 16:25:31 +0000 (18:25 +0200)
commitde210ec53c842fa67aa10110a7a351d64f91c487
treec1c7525c3ae291de507576704f47b90343f84554
parent7af67d694e289ab116c7abeca8a5bd752fbd46d7
python/qemu/qmp: assert sockfile is not None

In truth, if you don't do this, you'll just get a TypeError
exception. Now, you'll get an AssertionError.

Is this tangibly better? No.
Does mypy complain less? Yes.

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