From 8e73b8f7a16943912d7a32551194c269f8db1629 Mon Sep 17 00:00:00 2001 From: Dewey Cox Date: Tue, 11 Jan 2022 13:33:29 -0700 Subject: [PATCH] fixed a bug with getting model when it gets empty bytes --- cfg_util/func/miners.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cfg_util/func/miners.py b/cfg_util/func/miners.py index 8520ceec..aaadda6e 100644 --- a/cfg_util/func/miners.py +++ b/cfg_util/func/miners.py @@ -277,7 +277,10 @@ async def get_formatted_data(ip: ipaddress.ip_address): warnings.filterwarnings('ignore') miner_data = None host = await miner.get_hostname() - model = await miner.get_model() + try: + model = await miner.get_model() + except APIError: + model = "?" if not model: model = "?" temps = 0