diff options
| author | Rapptz <[email protected]> | 2015-12-08 16:12:26 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-12-08 16:12:26 -0500 |
| commit | 6217076cbf20c152460ff01cb5c76e707b9b6b2c (patch) | |
| tree | 0631644302bd8a9dc6162a55225495655afad634 | |
| parent | Clear up some documentation. (diff) | |
| download | discord.py-6217076cbf20c152460ff01cb5c76e707b9b6b2c.tar.xz discord.py-6217076cbf20c152460ff01cb5c76e707b9b6b2c.zip | |
Fix exception handling having a NameError
| -rw-r--r-- | discord/voice_client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/voice_client.py b/discord/voice_client.py index 6e631ea9..3ecc990a 100644 --- a/discord/voice_client.py +++ b/discord/voice_client.py @@ -346,8 +346,8 @@ class VoiceClient: cmd = cmd.format(command, filename, self.encoder.sampling_rate, self.encoder.channels) try: process = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE) - except: - raise ClientException('Popen failed: {}'.format(str(e))) + except Exception as e: + raise ClientException('Popen failed: {0.__name__} {1}'.format(type(e), str(e))) return StreamPlayer(process.stdout, self.encoder, self._connected, self.play_audio, after) |