diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index 0c05449cb6d4b4cc841480e394eb5cc0ded93180..1943de485282bd2c3158770743f65c1c6562ab8f 100644 --- a/scripts/qapi-commands.py +++ b/scripts/qapi-commands.py @@ -13,7 +13,6 @@ # See the COPYING file in the top-level directory. from qapi import * -import re def gen_command_decl(name, arg_type, boxed, ret_type): @@ -84,7 +83,8 @@ static void qmp_marshal_output_%(c_name)s(%(c_type)s ret_in, QObject **ret_out, def gen_marshal_proto(name): - return 'void qmp_marshal_%s(QDict *args, QObject **ret, Error **errp)' % c_name(name) + return ('void qmp_marshal_%s(QDict *args, QObject **ret, Error **errp)' + % c_name(name)) def gen_marshal_decl(name): @@ -198,7 +198,7 @@ def gen_register_command(name, success_response): options = 'QCO_NO_SUCCESS_RESP' ret = mcgen(''' - qmp_register_command(cmds, "%(name)s", + qmp_register_command(cmds, "%(name)s", qmp_marshal_%(c_name)s, %(opts)s); ''', name=name, c_name=c_name(name), diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index 3d3936e4d0a6bf8d9a39b275f7809cd81670bfd8..5737aefa05d02e440cf87a853cb577d8ed517d0c 100644 --- a/scripts/qapi-visit.py +++ b/scripts/qapi-visit.py @@ -13,7 +13,6 @@ # See the COPYING file in the top-level directory. from qapi import * -import re def gen_visit_decl(name, scalar=False): diff --git a/scripts/qapi.py b/scripts/qapi.py index b798ae47b206feea4f62f3c84b4070cfe00a9299..d19300d657c069693e627d7273e1264bd577c5f1 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -11,13 +11,13 @@ # This work is licensed under the terms of the GNU GPL, version 2. # See the COPYING file in the top-level directory. -import re -from ordereddict import OrderedDict import errno import getopt import os -import sys +import re import string +import sys +from ordereddict import OrderedDict builtin_types = { 'str': 'QTYPE_QSTRING', @@ -1587,7 +1587,7 @@ class QAPISchema(object): tag_member = None if isinstance(base, dict): base = (self._make_implicit_object_type( - name, info, doc, 'base', self._make_members(base, info))) + name, info, doc, 'base', self._make_members(base, info))) if tag_name: variants = [self._make_variant(key, value) for (key, value) in data.iteritems()]