aboutsummaryrefslogtreecommitdiff
path: root/discord/player.py
diff options
context:
space:
mode:
authorHornwitser <[email protected]>2018-08-01 11:41:15 +0200
committerRapptz <[email protected]>2018-11-24 22:17:57 -0500
commitfa46b07db15f5ce41be3f4944d2ff011794207d5 (patch)
tree0a87a0731c797cfadb69f7812ee4813628b4eba2 /discord/player.py
parent[lint] Remove redundant exception variables (diff)
downloaddiscord.py-fa46b07db15f5ce41be3f4944d2ff011794207d5.tar.xz
discord.py-fa46b07db15f5ce41be3f4944d2ff011794207d5.zip
[lint] Rename exception variables to exc
Use the more explicit (and common) exc instead of e as the variable holding the exception in except handlers.
Diffstat (limited to 'discord/player.py')
-rw-r--r--discord/player.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/discord/player.py b/discord/player.py
index a31b8fd2..e72d2c43 100644
--- a/discord/player.py
+++ b/discord/player.py
@@ -162,8 +162,8 @@ class FFmpegPCMAudio(AudioSource):
self._stdout = self._process.stdout
except FileNotFoundError:
raise ClientException(executable + ' was not found.') from None
- except subprocess.SubprocessError as e:
- raise ClientException('Popen failed: {0.__class__.__name__}: {0}'.format(e)) from e
+ except subprocess.SubprocessError as exc:
+ raise ClientException('Popen failed: {0.__class__.__name__}: {0}'.format(exc)) from exc
def read(self):
ret = self._stdout.read(OpusEncoder.FRAME_SIZE)
@@ -292,8 +292,8 @@ class AudioPlayer(threading.Thread):
def run(self):
try:
self._do_run()
- except Exception as e:
- self._current_error = e
+ except Exception as exc:
+ self._current_error = exc
self.stop()
finally:
self.source.cleanup()