From 62dfadecdface687841930de70f12d151961f47e Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Mon, 24 Feb 2020 15:27:17 +0100 Subject: Prune all sensitive data before sending it to Sentry CURA-7245 --- cura_app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cura_app.py') diff --git a/cura_app.py b/cura_app.py index a8fe708c5f..fba136516c 100755 --- a/cura_app.py +++ b/cura_app.py @@ -11,6 +11,7 @@ import sys from UM.Platform import Platform from cura import ApplicationMetadata from cura.ApplicationMetadata import CuraAppName +from cura.CrashHandler import CrashHandler try: import sentry_sdk @@ -42,8 +43,9 @@ if with_sentry_sdk: sentry_env = "nightly" except IndexError: pass - + sentry_sdk.init("https://5034bf0054fb4b889f82896326e79b13@sentry.io/1821564", + before_send = CrashHandler.sentry_before_send, environment = sentry_env, release = "cura%s" % ApplicationMetadata.CuraVersion, default_integrations = False, -- cgit v1.2.3 From 9c0e6f9338b05beb6556b6b2ad41bab449775fbf Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 24 Feb 2020 16:57:37 +0100 Subject: Apply suggestions from code review Codestyle! --- cura_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cura_app.py') diff --git a/cura_app.py b/cura_app.py index fba136516c..422313131b 100755 --- a/cura_app.py +++ b/cura_app.py @@ -45,7 +45,7 @@ if with_sentry_sdk: pass sentry_sdk.init("https://5034bf0054fb4b889f82896326e79b13@sentry.io/1821564", - before_send = CrashHandler.sentry_before_send, + before_send = CrashHandler.sentryBeforeSend, environment = sentry_env, release = "cura%s" % ApplicationMetadata.CuraVersion, default_integrations = False, -- cgit v1.2.3 From 1b65e47beae2c7bab359fd4b6857ab4cce01ef63 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 24 Feb 2020 17:08:19 +0100 Subject: Move imports of Arcus & Savitar up This was needed due to the crashhandler being imported CURA-7245 --- cura_app.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'cura_app.py') diff --git a/cura_app.py b/cura_app.py index 422313131b..5101f64c46 100755 --- a/cura_app.py +++ b/cura_app.py @@ -8,6 +8,13 @@ import faulthandler import os import sys +# Workaround for a race condition on certain systems where there +# is a race condition between Arcus and PyQt. Importing Arcus +# first seems to prevent Sip from going into a state where it +# tries to create PyQt objects on a non-main thread. +import Arcus # @UnusedImport +import Savitar # @UnusedImport + from UM.Platform import Platform from cura import ApplicationMetadata from cura.ApplicationMetadata import CuraAppName @@ -168,12 +175,7 @@ if sys.stderr: else: faulthandler.enable(file = sys.stdout, all_threads = True) -# Workaround for a race condition on certain systems where there -# is a race condition between Arcus and PyQt. Importing Arcus -# first seems to prevent Sip from going into a state where it -# tries to create PyQt objects on a non-main thread. -import Arcus #@UnusedImport -import Savitar #@UnusedImport + from cura.CuraApplication import CuraApplication -- cgit v1.2.3