Fix path to graph-explorer.

This commit is contained in:
Sergio Martínez Portela 2022-08-19 19:30:24 +02:00
parent f3096eb5d9
commit 3bf1a86c31

View File

@ -169,7 +169,7 @@ def main(src_top, dest_top):
json.dump(obj=graph, fp=f, indent=2)
graph_explorer_path = os.path.join(dest_top, "graph.html")
with open(graph_explorer_path, 'wt') as f:
with open(os.path.join(os.path.dirname(os.path.abspath(dest_top)), 'static', 'graph_explorer.html'), 'rt') as template:
with open(os.path.join(os.path.dirname(os.path.abspath(dest_top)), '..', 'static', 'graph_explorer.html'), 'rt') as template:
source = template.read()
f.write(source.replace('<!-- REPLACE_THIS_WITH_GRAPH -->',
json.dumps(graph)))