From 29afc8db7a3d6b50f33bb1252315f1b090f0ea47 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Thu, 27 Oct 2022 19:47:12 +0200 Subject: [PATCH] Make sure local dev still works with sentry --- app/app.py | 9 +++++---- app/config.example.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/app.py b/app/app.py index 852bc39..6ff1b25 100755 --- a/app/app.py +++ b/app/app.py @@ -174,10 +174,11 @@ def create_app(): # For usage when you directly call the script with python if __name__ == "__main__": - sentry_sdk.init( - dsn=Configuration.SENTRY_DSN, - integrations=[FlaskIntegration()] - ) + if Configuration.SENTRY_DSN: + sentry_sdk.init( + dsn=Configuration.SENTRY_DSN, + integrations=[FlaskIntegration()] + ) app, app_mgr = create_app() app_mgr.run() diff --git a/app/config.example.py b/app/config.example.py index 43cc22d..9606e09 100644 --- a/app/config.example.py +++ b/app/config.example.py @@ -12,6 +12,6 @@ class Configuration: SECRET_KEY = "" SLACK_WEBHOOK = None LOGFILE = "haldis.log" - SENTRY_DSN = "" + SENTRY_DSN = None ZEUS_KEY = "tomtest" ZEUS_SECRET = "blargh"