Skip to content

Commit

Permalink
Merge pull request #1267 from JuliaSprenger/enh/tdt
Browse files Browse the repository at this point in the history
[Tdt] Raise error in case no valid tdt structure was found
  • Loading branch information
apdavison authored Jul 27, 2023
2 parents 479c86f + 7a9c9d5 commit 06d9d08
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions neo/rawio/tdtrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def _parse_header(self):
elif is_tdtblock(self.dirname.parent):
segment_names.append(str(self.dirname.stem))
tankname = None
else:
raise ValueError(f'{self.dirname} is not a valid tdt structure. Make sure all files '
f'required for a tdt block are present.')

nb_segment = len(segment_names)
if nb_segment == 0:
Expand Down

0 comments on commit 06d9d08

Please sign in to comment.