Skip to content

Commit 70f278e

Browse files
authored
Merge pull request #1422 from jhlegarreta/UseAppropriateMsgInTckError
ENH: Use appropriate message when reporting TCK `file` attribute error
2 parents a8a1759 + f9b23a9 commit 70f278e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/streamlines/tck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def _read_header(cls, fileobj):
385385
'TCK only supports single-file - in other words the filename part must be '
386386
f"specified as '.' but '{hdr['file'].split()[0]}' was specified."
387387
)
388-
raise HeaderError("Missing 'file' attribute in TCK header.")
388+
raise HeaderError(msg)
389389

390390
# Set endianness and _dtype attributes in the header.
391391
hdr[Field.ENDIANNESS] = '>' if hdr['datatype'].endswith('BE') else '<'

0 commit comments

Comments
 (0)