Skip to content

Commit f8de5aa

Browse files
committed
Check for AttributeError when trying to silence stderr
Closes #27.
1 parent 68a30f8 commit f8de5aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sounddevice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2518,7 +2518,7 @@ def _ignore_stderr():
25182518
try:
25192519
stdio = ffi.dlopen(None)
25202520
devnull = stdio.fopen(_os.devnull.encode(), b'w')
2521-
except OSError:
2521+
except (OSError, AttributeError):
25222522
return
25232523
try:
25242524
stdio.stderr = devnull

0 commit comments

Comments
 (0)