summaryrefslogtreecommitdiffstats
path: root/scripts/qapi
diff options
context:
space:
mode:
authorJohn Snow2020-10-09 18:15:43 +0200
committerMarkus Armbruster2020-10-10 11:37:48 +0200
commitab2d8a75b6437b7386f77c5025e1331c20a5ac4e (patch)
treeea51200f1407eaa53e876fb9846b0f72442e72c7 /scripts/qapi
parentqapi/events.py: Move comments into docstrings (diff)
downloadqemu-ab2d8a75b6437b7386f77c5025e1331c20a5ac4e.tar.gz
qemu-ab2d8a75b6437b7386f77c5025e1331c20a5ac4e.tar.xz
qemu-ab2d8a75b6437b7386f77c5025e1331c20a5ac4e.zip
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>
Diffstat (limited to 'scripts/qapi')
-rw-r--r--scripts/qapi/commands.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py
index 88ba11c40e..b0abb985a4 100644
--- a/scripts/qapi/commands.py
+++ b/scripts/qapi/commands.py
@@ -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