don't catch all osx errors

This commit is contained in:
Damien Elmes 2009-06-15 11:37:02 +09:00
parent 7cac17a543
commit e66e66c614

View file

@ -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()