diff --git a/main.py b/main.py index 9bde696..f558a4a 100644 --- a/main.py +++ b/main.py @@ -72,7 +72,7 @@ BENCHMARKING_DELAY_IN_DAYS: float = 160 SKIP_BENCHMARKING: bool = False DEV_FEE: float = 0.05 -VERSION = 3.1 +VERSION = 3.2 DEV_RPC_PORT = 31418 LOG_LEVEL = "WARNING" START_TEMP: int = 65 @@ -1008,9 +1008,14 @@ def get_grc_price(sample_text: str = None) -> Union[float, None]: log.error("Error fetching stats from {}: {}".format(name, e)) regex_result = re.search(regex, resp) if regex_result: - answer = float(regex_result.group(2)) - log.info("Found GRC price of {} from {}".format(answer, name)) - found_prices.append(answer) + try: + answer = float(regex_result.group(2)) + except Exception as e: + DATABASE["TABLE_STATUS"] = "Error getting info from {}".format(name) + print_and_log("Error getting info from {}".format(name), "ERROR") + else: + log.info("Found GRC price of {} from {}".format(answer, name)) + found_prices.append(answer) else: DATABASE["TABLE_STATUS"] = "Error getting info from {}".format(name) print_and_log("Error getting info from {}".format(name), "ERROR") diff --git a/updates.txt b/updates.txt index 3b86804..cb70b5f 100644 --- a/updates.txt +++ b/updates.txt @@ -6,4 +6,5 @@ 2.2,1,FindTheMag critical security update please see Github for more info 2.3,0,Various usability improvements and crash fixes 3.0,0,Massive improvements in stability and new config file format -3.1,0,Stability improvements to reduce crashes \ No newline at end of file +3.1,0,Stability improvements to reduce crashes +3.2,0,Hotfix to prevent crash when checking GRC price \ No newline at end of file