mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
[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.
This commit is contained in:
1 parent
4ae8e81660
commit
fa46b07db1
10 files changed
+66
-66
No files matched your search
+4
-4
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user