From f8de5aa7d784d8801413abadca1903accbdc0fbd Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Thu, 30 Jun 2016 11:01:12 +0200 Subject: Check for AttributeError when trying to silence stderr Closes #27. --- sounddevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3