Skip to content

Commit 06d9d08

Browse files
authored
Merge pull request #1267 from JuliaSprenger/enh/tdt
[Tdt] Raise error in case no valid tdt structure was found
2 parents 479c86f + 7a9c9d5 commit 06d9d08

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

neo/rawio/tdtrawio.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ def _parse_header(self):
8989
elif is_tdtblock(self.dirname.parent):
9090
segment_names.append(str(self.dirname.stem))
9191
tankname = None
92+
else:
93+
raise ValueError(f'{self.dirname} is not a valid tdt structure. Make sure all files '
94+
f'required for a tdt block are present.')
9295

9396
nb_segment = len(segment_names)
9497
if nb_segment == 0:

0 commit comments

Comments
 (0)