mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
don't catch all osx errors
This commit is contained in:
parent
7cac17a543
commit
e66e66c614
1 changed files with 6 additions and 4 deletions
|
@ -8,7 +8,7 @@ Sound support
|
||||||
"""
|
"""
|
||||||
__docformat__ = 'restructuredtext'
|
__docformat__ = 'restructuredtext'
|
||||||
|
|
||||||
import re, sys, threading, time, subprocess, os, signal, atexit
|
import re, sys, threading, time, subprocess, os, signal, atexit, errno
|
||||||
|
|
||||||
# Shared utils
|
# Shared utils
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
@ -171,9 +171,11 @@ def stopMplayer():
|
||||||
try:
|
try:
|
||||||
mplayerManager.mplayer.communicate("quit\n")
|
mplayerManager.mplayer.communicate("quit\n")
|
||||||
break
|
break
|
||||||
except OSError:
|
except OSError, e:
|
||||||
# osx throws these regularly
|
if e.errno != errno.EINTR:
|
||||||
pass
|
# osx throws interrupt errors regularly, but we want to
|
||||||
|
# ignore other errors on shutdown
|
||||||
|
break
|
||||||
mplayerManager.mplayer = -1
|
mplayerManager.mplayer = -1
|
||||||
mplayerCond.notify()
|
mplayerCond.notify()
|
||||||
mplayerCond.release()
|
mplayerCond.release()
|
||||||
|
|
Loading…
Reference in a new issue