fixed a bug with getting model when it gets empty bytes

This commit is contained in:
Dewey Cox
2022-01-11 13:33:29 -07:00
parent 53af55a87d
commit 8e73b8f7a1

View File

@@ -277,7 +277,10 @@ async def get_formatted_data(ip: ipaddress.ip_address):
warnings.filterwarnings('ignore')
miner_data = None
host = await miner.get_hostname()
try:
model = await miner.get_model()
except APIError:
model = "?"
if not model:
model = "?"
temps = 0