mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -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'
|
||||
|
||||
import re, sys, threading, time, subprocess, os, signal, atexit
|
||||
import re, sys, threading, time, subprocess, os, signal, atexit, errno
|
||||
|
||||
# Shared utils
|
||||
##########################################################################
|
||||
|
@ -171,9 +171,11 @@ def stopMplayer():
|
|||
try:
|
||||
mplayerManager.mplayer.communicate("quit\n")
|
||||
break
|
||||
except OSError:
|
||||
# osx throws these regularly
|
||||
pass
|
||||
except OSError, e:
|
||||
if e.errno != errno.EINTR:
|
||||
# osx throws interrupt errors regularly, but we want to
|
||||
# ignore other errors on shutdown
|
||||
break
|
||||
mplayerManager.mplayer = -1
|
||||
mplayerCond.notify()
|
||||
mplayerCond.release()
|
||||
|
|
Loading…
Reference in a new issue