bug: fix insane amount of warnings when getting config.
This commit is contained in:
@@ -153,15 +153,16 @@ class BTMiner(BaseMiner):
|
|||||||
except APIError as e:
|
except APIError as e:
|
||||||
logging.warning(e)
|
logging.warning(e)
|
||||||
except LookupError:
|
except LookupError:
|
||||||
# somethings wrong with the miner
|
|
||||||
warnings.warn(
|
|
||||||
f"Failed to gather pool config for miner: {self}, miner did not return pool information."
|
|
||||||
)
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if pools:
|
if pools:
|
||||||
if "POOLS" in pools:
|
if "POOLS" in pools:
|
||||||
cfg = cfg.from_api(pools["POOLS"])
|
cfg = cfg.from_api(pools["POOLS"])
|
||||||
|
else:
|
||||||
|
# somethings wrong with the miner
|
||||||
|
warnings.warn(
|
||||||
|
f"Failed to gather pool config for miner: {self}, miner did not return pool information."
|
||||||
|
)
|
||||||
if summary:
|
if summary:
|
||||||
if "SUMMARY" in summary:
|
if "SUMMARY" in summary:
|
||||||
if wattage := summary["SUMMARY"][0].get("Power Limit"):
|
if wattage := summary["SUMMARY"][0].get("Power Limit"):
|
||||||
|
|||||||
Reference in New Issue
Block a user