diff options
author | Jaime van Kessel <nallath@gmail.com> | 2020-01-24 16:12:03 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2020-01-24 16:12:03 +0300 |
commit | c97ce6fafbfe987a875b984c7489f0b58a86a6ad (patch) | |
tree | 1259182bc0cf53bb3d8a66b07f774c6c4b191232 | |
parent | bd18a539e26aca452ec606741337a8364889cec5 (diff) |
Make the sentry_env a bit smarter
-rwxr-xr-x | cura_app.py | 8 |
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" |