fixed some bugs on linux with pipes

This commit is contained in:
UpstreamData
2022-03-18 12:02:42 -06:00
parent 134b5fe0ff
commit 4038dae446
3 changed files with 3 additions and 3 deletions

View File

@@ -137,7 +137,7 @@ If you are sure you want to use this command please use API.send_command("{item}
return data return data
@staticmethod @staticmethod
def validate_command_output(data: dict) -> tuple[bool, str | None]: def validate_command_output(data: dict) -> tuple:
"""Check if the returned command output is correctly formatted.""" """Check if the returned command output is correctly formatted."""
# check if the data returned is correct or an error # check if the data returned is correct or an error
# if status isn't a key, it is a multicommand # if status isn't a key, it is a multicommand

View File

@@ -163,7 +163,7 @@ class BTMinerAPI(BaseMinerAPI):
self.current_token = None self.current_token = None
async def send_command(self, async def send_command(self,
command: str | bytes, command: str or bytes,
parameters: str or int or bool = None, parameters: str or int or bool = None,
ignore_errors: bool = False ignore_errors: bool = False
) -> dict: ) -> dict:

View File

@@ -9,7 +9,7 @@ import logging
class BaseMiner: class BaseMiner:
def __init__(self, ip: str, api: BMMinerAPI | BOSMinerAPI | CGMinerAPI | BTMinerAPI | UnknownAPI) -> None: def __init__(self, ip: str, api: BMMinerAPI or BOSMinerAPI or CGMinerAPI or BTMinerAPI or UnknownAPI) -> None:
self.ip = ipaddress.ip_address(ip) self.ip = ipaddress.ip_address(ip)
self.uname = None self.uname = None
self.pwd = None self.pwd = None