work around osx not shutting down properly

This commit is contained in:
Damien Elmes 2009-06-13 03:20:54 +09:00
parent 56e8e4b3eb
commit 56d507c22d

View file

@ -172,8 +172,14 @@ def run():
app.exec_()
# ensure we kill any other threads
sys.exit(0)
if sys.platform.startswith("darwin"):
# buggy on osx
from anki.sound import stopMplayer
stopMplayer()
os._exit(0)
else:
# ensure we kill any other threads
sys.exit(0)
if __name__ == "__main__":
run()