Use cleaner notation for use_sentry env variable

CURA-11364

Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
This commit is contained in:
Jaime van Kessel 2023-11-29 10:42:12 +01:00 committed by GitHub
parent 60bf2fbc2c
commit 593e959dd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1101,10 +1101,7 @@ class CuraEngineBackend(QObject, Backend):
if auto_slice:
self._change_timer.start()
elif preference == "info/send_engine_crash":
if CuraApplication.getInstance().getPreferences().getValue("info/send_engine_crash"):
os.environ["use_sentry"] = str(1)
else:
os.environ["use_sentry"] = str(0)
os.environ["use_sentry"] = "1" if CuraApplication.getInstance().getPreferences().getValue("info/send_engine_crash") else "0"
def tickle(self) -> None:
"""Tickle the backend so in case of auto slicing, it starts the timer."""