updated some ports and fixed a bug with summary keys when getting data

This commit is contained in:
UpstreamData
2022-03-07 14:54:36 -07:00
parent 02114aac65
commit 7e91fe12e7
3 changed files with 3 additions and 3 deletions

View File

@@ -363,7 +363,7 @@ async def get_formatted_data(ip: ipaddress.ip_address):
if miner_data:
# get all data from summary
if "summary" in miner_data.keys():
if not miner_data["summary"][0].get("SUMMARY") == []:
if not miner_data["summary"][0].get("SUMMARY") == [] and "SUMMARY" in miner_data["summary"][0].keys():
# temperature data, this is the idea spot to get this
if "Temperature" in miner_data['summary'][0]['SUMMARY'][0].keys():
if not round(miner_data['summary'][0]['SUMMARY'][0]["Temperature"]) == 0: