mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Prevent division by 0 if total download size is 0
This can happen if the downloads are all so small that it gets rounded to 0kB. Fixes Sentry issue CURA-ZM.
This commit is contained in:
parent
f0456526b3
commit
3032221b70
3 changed files with 7 additions and 3 deletions
|
|
@ -39,7 +39,7 @@ except ImportError:
|
|||
parser = argparse.ArgumentParser(prog = "cura",
|
||||
add_help = False)
|
||||
parser.add_argument("--debug",
|
||||
action="store_true",
|
||||
action = "store_true",
|
||||
default = False,
|
||||
help = "Turn on the debug mode by setting this option."
|
||||
)
|
||||
|
|
@ -49,7 +49,7 @@ known_args = vars(parser.parse_known_args()[0])
|
|||
if with_sentry_sdk:
|
||||
sentry_env = "unknown" # Start off with a "IDK"
|
||||
if hasattr(sys, "frozen"):
|
||||
sentry_env = "production" # A frozen build has the posibility to be a "real" distribution.
|
||||
sentry_env = "production" # A frozen build has the possibility to be a "real" distribution.
|
||||
|
||||
if ApplicationMetadata.CuraVersion == "master":
|
||||
sentry_env = "development" # Master is always a development version.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue