aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-10-02 16:13:33 +0200
committerMarkus Armbruster <armbru@redhat.com>2017-12-20 19:18:33 +0100
commit2281d00c3d75e684d9c0051169a6ac1cc60b66cd (patch)
treeebb395edf9472d44b8d53f37f5182fd8f6cf12fc /scripts
parent67ab1ce9263f77b352faea1104f0ebc2e50a3d42 (diff)
qapi: Eliminate QAPISchemaParser.__init__()'s local fname
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20171002141341.24616-4-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index dc92bca620..6c8001e96d 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -261,8 +261,7 @@ class QAPISchemaParser(object):
def __init__(self, fp, previously_included=[], incl_info=None):
abs_fname = os.path.abspath(fp.name)
- fname = fp.name
- self.fname = fname
+ self.fname = fp.name
previously_included.append(abs_fname)
self.incl_info = incl_info
self.src = fp.read()
@@ -277,7 +276,7 @@ class QAPISchemaParser(object):
self.accept()
while self.tok is not None:
- info = {'file': fname, 'line': self.line,
+ info = {'file': self.fname, 'line': self.line,
'parent': self.incl_info}
if self.tok == '#':
self.reject_expr_doc()