summaryrefslogtreecommitdiff
path: root/examples/play_long_file.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/play_long_file.py')
-rwxr-xr-xexamples/play_long_file.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/play_long_file.py b/examples/play_long_file.py
index 198e520..1d554e2 100755
--- a/examples/play_long_file.py
+++ b/examples/play_long_file.py
@@ -72,9 +72,9 @@ def callback(outdata, frames, time, status):
assert not status
try:
data = q.get_nowait()
- except queue.Empty:
+ except queue.Empty as e:
print('Buffer is empty: increase buffersize?', file=sys.stderr)
- raise sd.CallbackAbort
+ raise sd.CallbackAbort from e
if len(data) < len(outdata):
outdata[:len(data)] = data
outdata[len(data):] = b'\x00' * (len(outdata) - len(data))