From d47e59d057ad4cd8b3332e112cba82391d51417a Mon Sep 17 00:00:00 2001 From: UpstreamData Date: Mon, 7 Nov 2022 10:09:56 -0700 Subject: [PATCH] bug: fix a bug with older versions of BOSMiner having tuner status in a different place. --- pyasic/miners/_backends/bosminer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyasic/miners/_backends/bosminer.py b/pyasic/miners/_backends/bosminer.py index c4c0906d..ab541613 100644 --- a/pyasic/miners/_backends/bosminer.py +++ b/pyasic/miners/_backends/bosminer.py @@ -266,7 +266,11 @@ class BOSMiner(BaseMiner): logging.warning(e) if tunerstatus: - tuner = tunerstatus[0].get("TUNERSTATUS") + print(tunerstatus) + try: + tuner = tunerstatus[0].get("TUNERSTATUS") + except KeyError: + tuner = tunerstatus.get("TUNERSTATUS") if tuner: if len(tuner) > 0: chain_status = tuner[0].get("TunerChainStatus")