[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/25] scripts/cpu-x86-uarch-abi.py: use .command() instead of .cm
From: |
John Snow |
Subject: |
[PULL 13/25] scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd() |
Date: |
Fri, 13 Oct 2023 15:09:28 -0400 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Here we don't expect a failure. In case of failure we'll crash on
trying to access ['return']. Better is to use .command() that clearly
raises on failure.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20231006154125.1068348-4-vsementsov@yandex-team.ru
Signed-off-by: John Snow <jsnow@redhat.com>
---
scripts/cpu-x86-uarch-abi.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/cpu-x86-uarch-abi.py b/scripts/cpu-x86-uarch-abi.py
index 82ff07582f..893afd1b35 100644
--- a/scripts/cpu-x86-uarch-abi.py
+++ b/scripts/cpu-x86-uarch-abi.py
@@ -69,7 +69,7 @@
shell = QEMUMonitorProtocol(sock)
shell.connect()
-models = shell.cmd("query-cpu-definitions")
+models = shell.command("query-cpu-definitions")
# These QMP props don't correspond to CPUID fatures
# so ignore them
@@ -85,7 +85,7 @@
names = []
-for model in models["return"]:
+for model in models:
if "alias-of" in model:
continue
names.append(model["name"])
@@ -93,12 +93,12 @@
models = {}
for name in sorted(names):
- cpu = shell.cmd("query-cpu-model-expansion",
- { "type": "static",
- "model": { "name": name }})
+ cpu = shell.command("query-cpu-model-expansion",
+ { "type": "static",
+ "model": { "name": name }})
got = {}
- for (feature, present) in cpu["return"]["model"]["props"].items():
+ for (feature, present) in cpu["model"]["props"].items():
if present and feature not in skip:
got[feature] = True
--
2.41.0
- [PULL 09/25] configure: fix error message to say Python 3.8, (continued)
- [PULL 09/25] configure: fix error message to say Python 3.8, John Snow, 2023/10/13
- [PULL 11/25] python/qemu/qmp/legacy: cmd(): drop cmd_id unused argument, John Snow, 2023/10/13
- [PULL 05/25] python/machine: use socketpair() for qtest connection, John Snow, 2023/10/13
- [PULL 07/25] Python/iotests: Add type hint for nbd module, John Snow, 2023/10/13
- [PULL 06/25] python/machine: remove unused sock_dir argument, John Snow, 2023/10/13
- [PULL 10/25] Python: Enable python3.12 support, John Snow, 2023/10/13
- [PULL 01/25] python/machine: move socket setup out of _base_args property, John Snow, 2023/10/13
- [PULL 12/25] qmp_shell.py: _fill_completion() use .command() instead of .cmd(), John Snow, 2023/10/13
- [PULL 14/25] python: rename QEMUMonitorProtocol.cmd() to cmd_raw(), John Snow, 2023/10/13
- [PULL 16/25] python/machine.py: upgrade vm.cmd() method, John Snow, 2023/10/13
- [PULL 13/25] scripts/cpu-x86-uarch-abi.py: use .command() instead of .cmd(),
John Snow <=
- [PULL 22/25] iotests.py: pause_job(): drop return value, John Snow, 2023/10/13
- [PULL 17/25] iotests: QemuStorageDaemon: add cmd() method like in QEMUMachine., John Snow, 2023/10/13
- [PULL 18/25] iotests: add some missed checks of qmp result, John Snow, 2023/10/13
- [PULL 19/25] iotests: refactor some common qmp result checks into generic pattern, John Snow, 2023/10/13
- [PULL 15/25] python/qemu: rename command() to cmd(), John Snow, 2023/10/13
- [PULL 24/25] scripts: add python_qmp_updater.py, John Snow, 2023/10/13
- [PULL 23/25] tests/vm/basevm.py: use cmd() instead of qmp(), John Snow, 2023/10/13
- [PULL 20/25] iotests: drop some extra semicolons, John Snow, 2023/10/13
- [PULL 25/25] python: use vm.cmd() instead of vm.qmp() where appropriate, John Snow, 2023/10/13
- [PULL 21/25] iotests: drop some extra ** in qmp() call, John Snow, 2023/10/13