mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
NoneType check for module in should_log_sentry (#2139)
Allows for a lack of module (which returns False) for `should_log_sentry`. This allows for, say, commands to be added by the Dev cog. ( ͡ಠ ʖ̯ ͡ಠ)
This commit is contained in:
parent
fc4703ef80
commit
a3c36d4bde
@ -43,7 +43,7 @@ def should_log_sentry(exception) -> bool:
|
||||
tb = tb.tb_next
|
||||
|
||||
module = tb_frame.f_globals.get("__name__")
|
||||
return module.startswith("redbot")
|
||||
return module is not None and module.startswith("redbot")
|
||||
|
||||
|
||||
def init_events(bot, cli_flags):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user