Skip to content

Commit

Permalink
qapi: Eliminate superfluous QAPISchema attribute input_dir
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
  • Loading branch information
Markus Armbruster committed Jun 18, 2015
1 parent 836c3b0 commit 12c7079
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/qapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def __init__(self, fp, input_relname=None, include_hist=[],
input_fname = os.path.abspath(fp.name)
if input_relname is None:
input_relname = fp.name
self.input_dir = os.path.dirname(input_fname)
self.input_file = input_relname
self.include_hist = include_hist + [(input_relname, input_fname)]
previously_included.append(input_fname)
Expand All @@ -134,7 +133,8 @@ def __init__(self, fp, input_relname=None, include_hist=[],
raise QAPIExprError(expr_info,
'Expected a file name (string), got: %s'
% include)
include_path = os.path.join(self.input_dir, include)
include_path = os.path.join(os.path.dirname(input_fname),
include)
for elem in self.include_hist:
if include_path == elem[1]:
raise QAPIExprError(expr_info, "Inclusion loop for %s"
Expand Down

0 comments on commit 12c7079

Please sign in to comment.