From d5e797de9ea06305268eecf2b90970d697d74525 Mon Sep 17 00:00:00 2001 From: Colin Crossman Date: Tue, 13 Dec 2022 11:42:36 -0700 Subject: [PATCH] Squash Whatsminer LED bug old implementation broke command syntax due to since required command parameters would be left off in certain cases. --- pyasic/API/btminer.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyasic/API/btminer.py b/pyasic/API/btminer.py index 5c179f22..ab579db2 100644 --- a/pyasic/API/btminer.py +++ b/pyasic/API/btminer.py @@ -189,10 +189,7 @@ class BTMinerAPI(BaseMinerAPI): self, command: Union[str, bytes], ignore_errors: bool = False, **kwargs ) -> dict: logging.debug(f"{self} - (Send Privileged Command) - {command} " + f'with args {kwargs}' if len(kwargs) > 0 else '') - command = {"cmd": command} - for kwarg in kwargs: - if kwargs[kwarg]: - command[kwarg] = kwargs[kwarg] + command = {"cmd": command, **kwargs} token_data = await self.get_token() enc_command = create_privileged_cmd(token_data, command)