diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-10-02 16:13:33 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-12-20 19:18:33 +0100 |
commit | 2281d00c3d75e684d9c0051169a6ac1cc60b66cd (patch) | |
tree | ebb395edf9472d44b8d53f37f5182fd8f6cf12fc /scripts | |
parent | 67ab1ce9263f77b352faea1104f0ebc2e50a3d42 (diff) | |
download | qemu-2281d00c3d75e684d9c0051169a6ac1cc60b66cd.zip qemu-2281d00c3d75e684d9c0051169a6ac1cc60b66cd.tar.gz qemu-2281d00c3d75e684d9c0051169a6ac1cc60b66cd.tar.bz2 |
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.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py index dc92bca..6c8001e 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() |