Skip to content

Commit

Permalink
python/qemu/qmp/legacy: cmd(): drop cmd_id unused argument
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20231006154125.1068348-2-vsementsov@yandex-team.ru
Signed-off-by: John Snow <jsnow@redhat.com>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and jnsnow committed Oct 12, 2023
1 parent 19a39e2 commit f187cfe
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions python/qemu/qmp/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f187cfe

Please sign in to comment.