Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2020-01-24 16:12:03 +0300
committerJaime van Kessel <nallath@gmail.com>2020-01-24 16:12:03 +0300
commitc97ce6fafbfe987a875b984c7489f0b58a86a6ad (patch)
tree1259182bc0cf53bb3d8a66b07f774c6c4b191232 /cura_app.py
parentbd18a539e26aca452ec606741337a8364889cec5 (diff)
Make the sentry_env a bit smarter
Diffstat (limited to 'cura_app.py')
-rwxr-xr-xcura_app.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/cura_app.py b/cura_app.py
index cb97792662..5184a5ab8b 100755
--- a/cura_app.py
+++ b/cura_app.py
@@ -29,9 +29,13 @@ parser.add_argument("--debug",
known_args = vars(parser.parse_known_args()[0])
if with_sentry_sdk:
- sentry_env = "production"
- if ApplicationMetadata.CuraVersion == "master":
+ sentry_env = "unknown" # Start off with a "IDK"
+ if hasattr(sys, "frozen"):
+ sentry_env = "production" # A frozen build is a "real" distribution.
+ elif ApplicationMetadata.CuraVersion == "master":
sentry_env = "development"
+ elif "beta" in ApplicationMetadata.CuraVersion or "BETA" in ApplicationMetadata.CuraVersion:
+ sentry_env = "beta"
try:
if ApplicationMetadata.CuraVersion.split(".")[2] == "99":
sentry_env = "nightly"