aboutsummaryrefslogtreecommitdiff
path: root/python/qemu/qmp
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2021-06-02 20:37:02 -0400
committerJohn Snow <jsnow@redhat.com>2021-06-18 16:10:06 -0400
commit5d15c9b875d2102143835ac989954a59a53d2b20 (patch)
treefa8737fb99f81c33890f250c12e164a54cd8fec0 /python/qemu/qmp
parent9d0ead63bf6b89ae7170dc4238a1ddc6b8188d14 (diff)
downloadqemu-5d15c9b875d2102143835ac989954a59a53d2b20.zip
qemu-5d15c9b875d2102143835ac989954a59a53d2b20.tar.gz
qemu-5d15c9b875d2102143835ac989954a59a53d2b20.tar.bz2
python/qmp: Fix type of SocketAddrT
In porting the qom tools, qmp-shell, etc; it becomes evident that this type is wrong. This is an integer, not a string. We didn't catch this before because none of QEMUMonitorProtocol's *users* happen to be checked, and the internal logic of this class is otherwise self-consistent. Additionally, mypy was not introspecting into the socket() interface to realize we were passing a bad type for AF_INET. Fixed now. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20210603003719.1321369-3-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'python/qemu/qmp')
-rw-r--r--python/qemu/qmp/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/qemu/qmp/__init__.py b/python/qemu/qmp/__init__.py
index 9606248..5fb970f 100644
--- a/python/qemu/qmp/__init__.py
+++ b/python/qemu/qmp/__init__.py
@@ -44,7 +44,7 @@ from typing import (
QMPMessage = Dict[str, Any]
QMPReturnValue = Dict[str, Any]
-InternetAddrT = Tuple[str, str]
+InternetAddrT = Tuple[str, int]
UnixAddrT = str
SocketAddrT = Union[InternetAddrT, UnixAddrT]