From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMebg-0006lj-AY for qemu-devel@nongnu.org; Tue, 04 Aug 2015 11:58:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMebc-0005IE-2G for qemu-devel@nongnu.org; Tue, 04 Aug 2015 11:58:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMebb-0005I4-Tn for qemu-devel@nongnu.org; Tue, 04 Aug 2015 11:58:20 -0400 From: Markus Armbruster Date: Tue, 4 Aug 2015 17:57:45 +0200 Message-Id: <1438703896-12553-2-git-send-email-armbru@redhat.com> In-Reply-To: <1438703896-12553-1-git-send-email-armbru@redhat.com> References: <1438703896-12553-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH RFC v3 01/32] qapi: Rename class QAPISchema to QAPISchemaParser List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, berto@igalia.com, mdroth@linux.vnet.ibm.com I want to name a new class QAPISchema. While there, make it a new-style class. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 56efb18..6297656 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -103,7 +103,7 @@ class QAPIExprError(Exception): return error_path(self.info['parent']) + \ "%s:%d: %s" % (self.info['file'], self.info['line'], self.msg) -class QAPISchema: +class QAPISchemaParser(object): def __init__(self, fp, previously_included = [], incl_info = None): abs_fname = os.path.abspath(fp.name) @@ -149,8 +149,8 @@ class QAPISchema: except IOError, e: raise QAPIExprError(expr_info, '%s: %s' % (e.strerror, include)) - exprs_include = QAPISchema(fobj, previously_included, - expr_info) + exprs_include = QAPISchemaParser(fobj, previously_included, + expr_info) self.exprs.extend(exprs_include.exprs) else: expr_elem = {'expr': expr, @@ -759,7 +759,7 @@ def check_exprs(exprs): def parse_schema(fname): try: - schema = QAPISchema(open(fname, "r")) + schema = QAPISchemaParser(open(fname, "r")) return check_exprs(schema.exprs) except (QAPISchemaError, QAPIExprError), e: print >>sys.stderr, e -- 2.4.3