We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 397eac5 commit bcc7959Copy full SHA for bcc7959
sounddevice.py
@@ -2827,8 +2827,8 @@ def _initialize():
2827
old_stderr = 2 # To appease Pyright
2828
try:
2829
old_stderr = _os.dup(2)
2830
- devnull = open(_os.devnull, 'w')
2831
- _os.dup2(devnull.fileno(), 2)
+ devnull = _os.open(_os.devnull, _os.O_WRONLY)
+ _os.dup2(devnull, 2)
2832
except OSError:
2833
pass
2834
@@ -2838,7 +2838,7 @@ def _initialize():
2838
finally:
2839
if devnull is not None:
2840
_os.dup2(old_stderr, 2)
2841
- devnull.close()
+ _os.close(devnull)
2842
2843
2844
def _terminate():
0 commit comments