Skip to content

Commit 8102aa7

Browse files
committed
RF: Re-consolidate nifti error message
1 parent c8c3cf9 commit 8102aa7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

nibabel/nifti1.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,8 +1740,7 @@ def _chk_magic(hdr, fix=False):
17401740
magic = hdr['magic'].item()
17411741
if magic in (hdr.pair_magic, hdr.single_magic):
17421742
return hdr, rep
1743-
magic = magic.decode('latin-1')
1744-
rep.problem_msg = f'magic string "{magic}" is not valid'
1743+
rep.problem_msg = f'magic string {magic.decode("latin1")!r} is not valid'
17451744
rep.problem_level = 45
17461745
if fix:
17471746
rep.fix_msg = 'leaving as is, but future errors are likely'

0 commit comments

Comments
 (0)