aboutsummaryrefslogtreecommitdiff
path: root/discord/ext
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/ext
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/ext')
-rw-r--r--discord/ext/commands/core.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py
index bcf2cd8a..8e28159d 100644
--- a/discord/ext/commands/core.py
+++ b/discord/ext/commands/core.py
@@ -260,15 +260,15 @@ class Command:
elif isinstance(converter, converters.Converter):
ret = await converter.convert(ctx, argument)
return ret
- except CommandError as e:
- raise e
+ except CommandError:
+ raise
except Exception as e:
raise ConversionError(converter, e) from e
try:
return converter(argument)
- except CommandError as e:
- raise e
+ except CommandError:
+ raise
except Exception as e:
try:
name = converter.__name__
@@ -363,7 +363,7 @@ class Command:
argument = quoted_word(view)
try:
value = await self.do_conversion(ctx, converter, argument, param)
- except CommandError as e:
+ except CommandError:
if not result:
if required:
raise