diff options
| author | 2020-10-17 20:33:10 -0700 | |
|---|---|---|
| committer | 2020-10-17 20:33:10 -0700 | |
| commit | e18b5903d13f0bfd98e71627fde32d0a79397981 (patch) | |
| tree | b72d16a9918feb6c1f656a16cfa13550e711cb36 | |
| parent | Move bot creation code from __main__.py to bot.py (diff) | |
Set up Sentry when running rather than upon import
It was causing an error if a DSN was not configured. It also feels wrong
and confusing to attempt to make a connection just upon import.
Diffstat (limited to '')
| -rw-r--r-- | bot/__init__.py | 1 | ||||
| -rw-r--r-- | bot/__main__.py | 3 | 
2 files changed, 3 insertions, 1 deletions
| diff --git a/bot/__init__.py b/bot/__init__.py index d2fd107a0..8f880b8e6 100644 --- a/bot/__init__.py +++ b/bot/__init__.py @@ -12,7 +12,6 @@ if TYPE_CHECKING:      from bot.bot import Bot  log.setup() -log.setup_sentry()  # On Windows, the selector event loop is required for aiodns.  if os.name == "nt": diff --git a/bot/__main__.py b/bot/__main__.py index 9847c1849..257216fa7 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -1,6 +1,9 @@  import bot  from bot import constants  from bot.bot import Bot +from bot.log import setup_sentry + +setup_sentry()  bot.instance = Bot.create()  bot.instance.load_extensions() | 
