qapi/commands.py: Don't re-bind to variable of different type

Mypy isn't a fan of rebinding a variable with a new data type.
It's easy enough to avoid.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20201009161558.107041-22-jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
John Snow 2020-10-09 12:15:43 -04:00 committed by Markus Armbruster
parent 1a503761e4
commit ab2d8a75b6
1 changed files with 1 additions and 3 deletions

View File

@ -198,14 +198,12 @@ def gen_register_command(name, success_response, allow_oob, allow_preconfig,
if not options:
options = ['QCO_NO_OPTIONS']
options = " | ".join(options)
ret = mcgen('''
qmp_register_command(cmds, "%(name)s",
qmp_marshal_%(c_name)s, %(opts)s);
''',
name=name, c_name=c_name(name),
opts=options)
opts=" | ".join(options))
return ret