From 4ae8e816603ce8df6242dcd85174514972067448 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Wed, 1 Aug 2018 11:36:46 +0200 Subject: [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. --- discord/opus.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'discord/opus.py') 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): -- cgit v1.2.3