[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.
This commit is contained in:
Hornwitser
2018-08-01 11:36:46 +02:00
committed by Rapptz
parent a71b3b5fa0
commit 4ae8e81660
5 changed files with 13 additions and 16 deletions

View File

@ -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