All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] python/qom: Fix qom-set failure
@ 2021-12-20 17:44 Wang Bing-hua
  2022-01-10 20:16 ` John Snow
  0 siblings, 1 reply; 3+ messages in thread
From: Wang Bing-hua @ 2021-12-20 17:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eduardo Habkost, John Snow, Wang Bing-hua, Cleber Rosa

Fix the following failure by interpreting 'value' argument as 'int'.

$ scripts/qmp/qom-set -s /tmp/qmp-socket /machine/unattached/device[6].temperature 0
QMPResponseError: Invalid parameter type for 'temperature', expected: integer

Fixes: c750c02891a8 ("python/qmp: Add qom script rewrites")
Signed-off-by: Wang Bing-hua <louiswpf@gmail.com>
---
 python/qemu/qmp/qom.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/python/qemu/qmp/qom.py b/python/qemu/qmp/qom.py
index 8ff28a8343..0b77dc6aa3 100644
--- a/python/qemu/qmp/qom.py
+++ b/python/qemu/qmp/qom.py
@@ -72,6 +72,7 @@ def configure_parser(cls, parser: argparse.ArgumentParser) -> None:
         cls.add_path_prop_arg(parser)
         parser.add_argument(
             'value',
+            type=int,
             metavar='<value>',
             action='store',
             help='new QOM property value'
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-18 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 17:44 [PATCH] python/qom: Fix qom-set failure Wang Bing-hua
2022-01-10 20:16 ` John Snow
2022-01-18 16:20   ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.