Skip to content

Commit

Permalink
ontload fix import_tree issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tgbugs committed Jul 12, 2023
1 parent 0a96bed commit 2718edb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pyontutils/ontload.py
Original file line number Diff line number Diff line change
Expand Up @@ -990,10 +990,14 @@ def run(args):
else:
ontology = ontologies # FIXME will error

for tree, extra in import_tree(import_graph, ontology):
name = Path(next(iter(tree.keys()))).name
with open(jpth(zip_location, f'{name}-import-closure.html'), 'wt') as f:
f.write(extra.html.replace('NIFTTL:', '')) # much more readable
if ontology.startswith('/'):
ontology = 'file://' + ontology

for tree, extra in (import_tree(import_graph, ontology),):
if tree is not None:
name = Path(next(iter(tree.keys()))).name
with open(jpth(zip_location, f'{name}-import-closure.html'), 'wt') as f:
f.write(extra.html.replace('NIFTTL:', '')) # much more readable

if debug:
breakpoint()
Expand Down

0 comments on commit 2718edb

Please sign in to comment.