Message ID | 20231005135550.331657-2-vsementsov@yandex-team.ru |
---|---|
State | New |
Headers | show |
Series | iotests: use vm.cmd() | expand |
On Thu, Oct 05, 2023 at 04:55:37PM +0300, Vladimir Sementsov-Ogievskiy wrote: > The argument is unused, let's drop it for now, as we are going to > refactor the interface and don't want to refactor unused things. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> > --- > python/qemu/qmp/legacy.py | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) Reviewed-by: Eric Blake <eblake@redhat.com> Although I welcome John's opinion as to how long we have to maintain legacy.py at all, given that its name implies there is a better thing we should have converted to already.
diff --git a/python/qemu/qmp/legacy.py b/python/qemu/qmp/legacy.py index e1e9383978..fe115e301c 100644 --- a/python/qemu/qmp/legacy.py +++ b/python/qemu/qmp/legacy.py @@ -195,20 +195,16 @@ def cmd_obj(self, qmp_cmd: QMPMessage) -> QMPMessage: ) def cmd(self, name: str, - args: Optional[Dict[str, object]] = None, - cmd_id: Optional[object] = None) -> QMPMessage: + args: Optional[Dict[str, object]] = None) -> QMPMessage: """ Build a QMP command and send it to the QMP Monitor. :param name: command name (string) :param args: command arguments (dict) - :param cmd_id: command id (dict, list, string or int) """ qmp_cmd: QMPMessage = {'execute': name} if args: qmp_cmd['arguments'] = args - if cmd_id: - qmp_cmd['id'] = cmd_id return self.cmd_obj(qmp_cmd) def command(self, cmd: str, **kwds: object) -> QMPReturnValue:
The argument is unused, let's drop it for now, as we are going to refactor the interface and don't want to refactor unused things. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> --- python/qemu/qmp/legacy.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)