summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Geier <Matthias.Geier@gmail.com>2016-06-30 11:01:12 +0200
committerMatthias Geier <Matthias.Geier@gmail.com>2016-06-30 11:01:12 +0200
commitf8de5aa7d784d8801413abadca1903accbdc0fbd (patch)
treebf4d504084802dde4e8b87e76ecb236e842ed62c
parent68a30f8da513ae15e517c5d27d4ae4755ca9f368 (diff)
Check for AttributeError when trying to silence stderr
Closes #27.
-rw-r--r--sounddevice.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sounddevice.py b/sounddevice.py
index 522d626..3a40486 100644
--- a/sounddevice.py
+++ b/sounddevice.py
@@ -2518,7 +2518,7 @@ def _ignore_stderr():
try:
stdio = ffi.dlopen(None)
devnull = stdio.fopen(_os.devnull.encode(), b'w')
- except OSError:
+ except (OSError, AttributeError):
return
try:
stdio.stderr = devnull