aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-06-02 06:43:33 -0400
committerRapptz <[email protected]>2017-06-02 06:43:33 -0400
commitdaf066dd39a7c98c4d89b08d4b4d1e135229f2a9 (patch)
tree1023c91787d8fb928ce6f54cd3c4b40b94893ee0
parentFix FAQ to showcase that there is a single parameter, the error. (diff)
downloaddiscord.py-daf066dd39a7c98c4d89b08d4b4d1e135229f2a9.tar.xz
discord.py-daf066dd39a7c98c4d89b08d4b4d1e135229f2a9.zip
Log when a player's after function fails.
-rw-r--r--discord/player.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/player.py b/discord/player.py
index 0e0ccd41..2565cdb9 100644
--- a/discord/player.py
+++ b/discord/player.py
@@ -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()