[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/72] python/qmp: Fix type of SocketAddrT
From: |
John Snow |
Subject: |
[PULL 02/72] python/qmp: Fix type of SocketAddrT |
Date: |
Fri, 18 Jun 2021 19:03:45 -0400 |
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>
---
python/qemu/qmp/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/qemu/qmp/__init__.py b/python/qemu/qmp/__init__.py
index 9606248a3d..5fb970f8a8 100644
--- a/python/qemu/qmp/__init__.py
+++ b/python/qemu/qmp/__init__.py
@@ -44,7 +44,7 @@
QMPMessage = Dict[str, Any]
QMPReturnValue = Dict[str, Any]
-InternetAddrT = Tuple[str, str]
+InternetAddrT = Tuple[str, int]
UnixAddrT = str
SocketAddrT = Union[InternetAddrT, UnixAddrT]
--
2.31.1
- [PULL 00/72] Python patches, John Snow, 2021/06/18
- [PULL 02/72] python/qmp: Fix type of SocketAddrT,
John Snow <=
- [PULL 05/72] python/qmp: add qom script entry points, John Snow, 2021/06/18
- [PULL 07/72] scripts/qom-fuse: apply isort rules, John Snow, 2021/06/18
- [PULL 12/72] scripts/qom-fuse: Convert to QOMCommand, John Snow, 2021/06/18
- [PULL 14/72] scripts/qom-fuse: ensure QOMFuse.read always returns bytes, John Snow, 2021/06/18
- [PULL 06/72] scripts/qmp: redirect qom-xxx scripts to python/qemu/qmp/, John Snow, 2021/06/18
- [PULL 09/72] python: Add 'fh' to known-good variable names, John Snow, 2021/06/18
- [PULL 17/72] scripts/qom-fuse: move to python/qemu/qmp/qom_fuse.py, John Snow, 2021/06/18
- [PULL 01/72] python/pipenv: Update Pipfile.lock, John Snow, 2021/06/18
- [PULL 08/72] scripts/qom-fuse: apply flake8 rules, John Snow, 2021/06/18
- [PULL 15/72] scripts/qom-fuse: add static type hints, John Snow, 2021/06/18