diff --git a/miners/bosminer.py b/miners/bosminer.py index e17876cd..3ff41445 100644 --- a/miners/bosminer.py +++ b/miners/bosminer.py @@ -99,4 +99,4 @@ class BOSminer(BaseMiner): if chain['Chips'] == 0: bad += 1 if not bad > 0: - return str(self.ip) + return str(self.ip) \ No newline at end of file diff --git a/miners/cgminer.py b/miners/cgminer.py index 73fb6197..616f7afe 100644 --- a/miners/cgminer.py +++ b/miners/cgminer.py @@ -41,15 +41,6 @@ class CGMiner(BaseMiner): continue # handle result self._result_handler(result) - if result is not None: - if result.stdout != "": - print(result.stdout) - if result.stderr != "": - print("ERROR: " + result.stderr) - elif result.stderr != "": - print("ERROR: " + result.stderr) - else: - print(cmd) @staticmethod def _result_handler(result: asyncssh.process.SSHCompletedProcess) -> None: @@ -60,6 +51,16 @@ class CGMiner(BaseMiner): print("ssh stderr: \n" + result.stderrr) if len(result.stdout) <= 0 and len(result.stderr) <= 0: print("ssh stdout stderr empty") + else: + print(cmd) + # if result.stdout != "": + # print(result.stdout) + # if result.stderr != "": + # print("ERROR: " + result.stderr) + # elif result.stderr != "": + # print("ERROR: " + result.stderr) + # else: + # print(cmd) async def restart_cgminer(self) -> None: commands = ['cgminer-api restart', @@ -94,4 +95,4 @@ class CGMiner(BaseMiner): result = await conn.run(command, check=True) self._result_handler(result) self.config = result.stdout - print(str(self.config)) + print(str(self.config)) \ No newline at end of file