diff options
| author | Ram Rachum <ram@rachum.com> | 2020-07-27 14:42:52 +0300 |
|---|---|---|
| committer | Ram Rachum <ram@rachum.com> | 2020-07-27 14:42:52 +0300 |
| commit | 2b68a6056f4ae406eed09729a778c9f1b651317e (patch) | |
| tree | d42215d8395c80766d0d3e7db51091614b191b7b /examples/play_long_file.py | |
| parent | afe0a822b5591c2e3ae7fe9f1517d7342e048c46 (diff) | |
Fix exception causes all over the codebase
Diffstat (limited to 'examples/play_long_file.py')
| -rwxr-xr-x | examples/play_long_file.py | 4 |
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)) |
