Log when a player's after function fails.

This commit is contained in:
Rapptz 2017-06-02 06:43:33 -04:00
parent a18267ca49
commit daf066dd39

View File

@ -27,12 +27,15 @@ DEALINGS IN THE SOFTWARE.
import threading
import subprocess
import audioop
import logging
import shlex
import time
from .errors import ClientException
from .opus import Encoder as OpusEncoder
log = logging.getLogger(__name__)
__all__ = [ 'AudioSource', 'PCMAudio', 'FFmpegPCMAudio', 'PCMVolumeTransformer' ]
class AudioSource:
@ -286,7 +289,7 @@ class AudioPlayer(threading.Thread):
try:
self.after(self._current_error)
except:
pass
log.exception('Calling the after function failed.')
def stop(self):
self._end.set()