refactor: remove parameters from get_{x} functions and move them to _get_{x}(**params). Add miner.fw_str, and miner.raw_model. Remove model from get_data exclude. Swap fan_count to expected_fans.

This commit is contained in:
UpstreamData
2024-01-11 11:33:44 -07:00
parent 067d5c98f5
commit 06cc84f16d
2 changed files with 27 additions and 17 deletions

View File

@@ -14,9 +14,10 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from typing import List, Optional
from typing import List, Optional, Tuple
from pyasic.config import MinerConfig
from pyasic import MinerConfig
from pyasic.config import MinerConfig, MiningModeConfig
from pyasic.data import Fan, HashBoard
from pyasic.data.error_codes import MinerErrorData, X19Error
from pyasic.errors import APIError
@@ -216,7 +217,7 @@ class ePIC(BaseMiner):
hashrate += hb["Hashrate"][0] / ideal
return round(float(float(hashrate / 1000000)), 2)
except (LookupError, ValueError, TypeError) as e:
except (IndexError, KeyError, ValueError, TypeError) as e:
logger.error(e)
pass