From fb843e5468f2fa2ee31b3533939436d21095c4bf Mon Sep 17 00:00:00 2001 From: Will Gunty Date: Wed, 10 Jul 2024 19:00:16 -0700 Subject: [PATCH] Fixing GCRPRICE to default to 0 if there is no value in the DB --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index ad500ec..8adf6d7 100644 --- a/main.py +++ b/main.py @@ -4014,7 +4014,8 @@ def boinc_loop( if grc_price: DATABASE["GRCPRICE"] = grc_price else: - grc_price = DATABASE["GRCPRICE"] + grc_price = DATABASE.get("GRCPRICE",0) + # Check profitability of all projects, if none profitable # (and user doesn't want unprofitable crunching), sleep for 1hr if ONLY_BOINC_IF_PROFITABLE and not dev_loop: