Skip to content

Commit

Permalink
fix: read annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
dmartmillan committed Mar 8, 2022
1 parent 201c7ca commit 2293d83
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions openvariant/find/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ def _find_files(base_path: str, annotation: Annotation or None, fix: bool) -> Ge

if isfile(file_path):
if annotation is not None:
for ext, _ in annotation.structure.items():
if _check_extension(ext, file_path):
yield file_path, annotation
try:
for ext, _ in annotation.structure.items():
if _check_extension(ext, file_path):
yield file_path, annotation
except AttributeError:
raise AttributeError("Unable to parse annotation file, check its location.")
else:
for f, a in _find_files(file_path, annotation, fix):
yield f, a
Expand Down

0 comments on commit 2293d83

Please sign in to comment.