mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
67ab1ce926
commit
2281d00c3d
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue