Skip to content

Commit

Permalink
Define template_vars later to avoid update().
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Lawler committed Feb 19, 2020
1 parent 340ddca commit 4be9f72
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions estracker/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ def main():
abs_outpath = os.path.abspath(outpath)
io.ensure_dir(abs_outpath)

template_vars = {
"track_name": args.track_name
}

indices = []
corpora = []
for index_name in args.indices:
Expand All @@ -104,10 +100,12 @@ def main():
corpus_vars = corpus.extract(client, outpath, index_name)
corpora.append(corpus_vars)

template_vars.update({
template_vars ={
"track_name": args.track_name,
"indices": indices,
"corpora": corpora
})
}

for template, dest_filename in TRACK_TEMPLATES.items():
dest_path = os.path.join(outpath, dest_filename)
process_template(template, template_vars, dest_path)
Expand Down

0 comments on commit 4be9f72

Please sign in to comment.