fixed some small bugs with whatsminers and progress bar

This commit is contained in:
UpstreamData
2022-05-11 13:20:14 -06:00
parent 4eb51eed20
commit e9a1483e5f
4 changed files with 7 additions and 5 deletions

View File

@@ -193,6 +193,8 @@ If you are sure you want to use this command please use API.send_command("{item}
str_data = str_data.replace("}{", "},{")
# fix an error with a bmminer return having a specific comma that breaks json.loads()
str_data = str_data.replace("[,{", "[{")
# fix an error with a btminer return having a specific comma that breaks json.loads()
str_data = str_data.replace("inf", "0")
# parse the json
parsed_data = json.loads(str_data)
# handle bad json