bug: fix raising warnings for partially supported None miners

This commit is contained in:
Upstream Data
2024-11-19 14:23:23 -07:00
parent cc97ceee61
commit db6499800b

View File

@@ -866,6 +866,7 @@ class MinerFactory:
return MINER_CLASSES[miner_type][str(miner_model).upper()](ip) return MINER_CLASSES[miner_type][str(miner_model).upper()](ip)
except LookupError: except LookupError:
if miner_type in MINER_CLASSES: if miner_type in MINER_CLASSES:
if miner_model is not None:
warnings.warn( warnings.warn(
f"Partially supported miner found: {miner_model}, please open an issue with miner data " f"Partially supported miner found: {miner_model}, please open an issue with miner data "
f"and this model on GitHub (https://github.com/UpstreamData/pyasic/issues)." f"and this model on GitHub (https://github.com/UpstreamData/pyasic/issues)."