aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-09-16 13:06:04 +0200
committerMarkus Armbruster <armbru@redhat.com>2015-09-21 09:11:42 +0200
commita4bcb2080d5c1d08bab512d76fb260296e2cae74 (patch)
treed1eda987bfa5432a332ac2047edab89f2c2d1632 /scripts
parent18640989a9f5e4d2e84b566c52ff1fccfa0dbf4a (diff)
qapi: Rename class QAPISchema to QAPISchemaParser
I want to name a new class QAPISchema. While there, make it a new-style class. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1442401589-24189-2-git-send-email-armbru@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index c4423b740c..2a0f465033 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,
@@ -755,7 +755,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