Proper exception chaining.

This commit is contained in:
Rapptz
2016-01-13 20:08:55 -05:00
parent bbe6455eb9
commit 4edff12f6b
3 changed files with 7 additions and 7 deletions

View File

@@ -400,7 +400,7 @@ class VoiceClient:
p = subprocess.Popen(args, stdin=stdin, stdout=subprocess.PIPE)
return ProcessPlayer(p, self, after)
except subprocess.SubprocessError as e:
raise ClientException('Popen failed: {0.__name__} {1}'.format(type(e), str(e)))
raise ClientException('Popen failed: {0.__name__} {1}'.format(type(e), str(e))) from e
def create_ytdl_player(self, url, *, options=None, use_avconv=False, after=None):