aboutsummaryrefslogtreecommitdiff
path: root/discord/opus.py
diff options
context:
space:
mode:
authorHornwitser <[email protected]>2018-08-01 11:36:46 +0200
committerRapptz <[email protected]>2018-11-24 22:17:57 -0500
commit4ae8e816603ce8df6242dcd85174514972067448 (patch)
tree808d389939169ffee69afcabbe932c09a307207c /discord/opus.py
parent[lint] Limit unneccessarily broad except clauses (diff)
downloaddiscord.py-4ae8e816603ce8df6242dcd85174514972067448.tar.xz
discord.py-4ae8e816603ce8df6242dcd85174514972067448.zip
[lint] Remove redundant exception variables
Use bare raise statement when reraising the exception that occured, and remove unused exception variables. Also remove a pointless exception handler in discord.opus.
Diffstat (limited to 'discord/opus.py')
-rw-r--r--discord/opus.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/discord/opus.py b/discord/opus.py
index 6003ca7c..36a178a7 100644
--- a/discord/opus.py
+++ b/discord/opus.py
@@ -81,10 +81,7 @@ def libopus_loader(name):
# register the functions...
for item in exported_functions:
- try:
- func = getattr(lib, item[0])
- except Exception as e:
- raise e
+ func = getattr(lib, item[0])
try:
if item[1]:
@@ -110,7 +107,7 @@ try:
_lib = libopus_loader(_filename)
else:
_lib = libopus_loader(ctypes.util.find_library('opus'))
-except Exception as e:
+except Exception:
_lib = None
def load_opus(name):