fix a bug with vnish miner identification

This commit is contained in:
UpstreamData
2022-08-05 12:12:10 -06:00
parent 9494018c12
commit 0ac80fb205

View File

@@ -538,10 +538,10 @@ class MinerFactory(metaclass=Singleton):
if stats: if stats:
if stats["STATS"][0].get("Type"): if stats["STATS"][0].get("Type"):
_model = stats["STATS"][0]["Type"].upper() _model = stats["STATS"][0]["Type"].upper()
if "BB" in _model: if " BB" in _model:
_model = _model.split("BB")[0] _model = _model.split(" BB")[0]
if "XILINX" in _model: if " XILINX" in _model:
_model = _model.split("XILINX")[0] _model = _model.split(" XILINX")[0]
if "PRO" in _model and not " PRO" in _model: if "PRO" in _model and not " PRO" in _model:
model = _model.replace("PRO", " PRO") model = _model.replace("PRO", " PRO")