bug: remove boser check in miner_factory, and fix bad syntax on comparison.

This commit is contained in:
b-rowan
2024-01-10 22:15:31 -07:00
parent bea44a72ea
commit 36494f2aca
2 changed files with 4 additions and 22 deletions

View File

@@ -84,14 +84,14 @@ class BOSerWebAPI(BOSMinerWebAPI):
**parameters: Union[str, int, bool],
) -> dict:
command_type = self.select_command_type(command)
if command_type is "gql":
if command_type == "gql":
return await self.gql.send_command(command)
elif command_type is "grpc":
elif command_type == "grpc":
try:
return await (getattr(self.grpc, command.replace("grpc_", "")))()
except AttributeError:
raise APIError(f"No gRPC command found for command: {command}")
elif command_type is "luci":
elif command_type == "luci":
return await self.luci.send_command(command)
@staticmethod