[lint] Limit unneccessarily broad except clauses
Add exception qualifier(s) to bare except clauses swallowing exceptions.
This commit is contained in:
@ -195,13 +195,13 @@ class BotBase(GroupMixin):
|
||||
for extension in tuple(self.extensions):
|
||||
try:
|
||||
self.unload_extension(extension)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
for cog in tuple(self.cogs):
|
||||
try:
|
||||
self.remove_cog(cog)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
await super().close()
|
||||
@ -759,7 +759,7 @@ class BotBase(GroupMixin):
|
||||
else:
|
||||
try:
|
||||
func(self)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
finally:
|
||||
# finally remove the import..
|
||||
|
@ -240,7 +240,7 @@ class Command:
|
||||
|
||||
try:
|
||||
module = converter.__module__
|
||||
except:
|
||||
except AttributeError:
|
||||
pass
|
||||
else:
|
||||
if module.startswith('discord.') and not module.endswith('converter'):
|
||||
|
Reference in New Issue
Block a user