bug: fix uncaught error in get_hashboards with BMMiner if a key doesnt exist.

This commit is contained in:
Upstream Data
2023-09-07 19:06:51 -06:00
parent ec7d241caa
commit 26c2095ff1

View File

@@ -238,9 +238,12 @@ class BMMiner(BaseMiner):
real_slots = []
for i in range(board_offset, board_offset + 4):
key = f'chain_acs{i}'
if boards[1][key] != '':
real_slots.append(i)
try:
key = f'chain_acs{i}'
if boards[1].get(key, '') != '':
real_slots.append(i)
except LookupError:
pass
if len(real_slots) < 3:
real_slots = list(range(board_offset, board_offset + self.ideal_hashboards))