Skip to content

Commit 161e930

Browse files
authored
Merge pull request #232 from boeddeker/patch-1
improve _check_dtype exception
2 parents cc8b67a + 66046bb commit 161e930

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

soundfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,8 +1295,8 @@ def _check_dtype(self, dtype):
12951295
try:
12961296
return _ffi_types[dtype]
12971297
except KeyError:
1298-
raise ValueError("dtype must be one of {0!r}".format(
1299-
sorted(_ffi_types.keys())))
1298+
raise ValueError("dtype must be one of {0!r} and not {1!r}".format(
1299+
sorted(_ffi_types.keys()), dtype))
13001300

13011301
def _array_io(self, action, array, frames):
13021302
"""Check array and call low-level IO function."""

0 commit comments

Comments
 (0)