diff --git a/tools/web_testbench/_miners.py b/tools/web_testbench/_miners.py index 369146e8..d9419fd3 100644 --- a/tools/web_testbench/_miners.py +++ b/tools/web_testbench/_miners.py @@ -48,7 +48,9 @@ class TestbenchMiner: await asyncio.sleep(1) async def install_start(self): - await ConnectionManager().broadcast_json({"IP": str(self.host), "Light": "hide"}) + await ConnectionManager().broadcast_json( + {"IP": str(self.host), "Light": "hide"} + ) if not await ping_miner(self.host, 80): await self.add_to_output("Waiting for miner connection...") return @@ -57,7 +59,9 @@ class TestbenchMiner: await self.add_to_output("Found miner: " + str(miner)) if isinstance(miner, BOSMinerS9): if await self.get_bos_version() == self.latest_version: - await self.add_to_output(f"Already running the latest version of BraiinsOS, {self.latest_version}, configuring.") + await self.add_to_output( + f"Already running the latest version of BraiinsOS, {self.latest_version}, configuring." + ) self.state = REFERRAL return await self.add_to_output("Already running BraiinsOS, updating.") @@ -90,14 +94,12 @@ class TestbenchMiner: return False return True - async def fix_file_exists_bug(self): miner = await MinerFactory().get_miner(self.host) await miner.send_ssh_command( "rm /lib/ld-musl-armhf.so.1; rm /usr/lib/openssh/sftp-server; rm /usr/sbin/fw_printenv" ) - async def do_install(self): error = False proc = await asyncio.create_subprocess_shell( diff --git a/tools/web_testbench/app.py b/tools/web_testbench/app.py index 4837ed41..a523f18b 100644 --- a/tools/web_testbench/app.py +++ b/tools/web_testbench/app.py @@ -44,7 +44,12 @@ async def ws(websocket: WebSocket): ConnectionManager.lit_miners.append(data["IP"]) await miner.fault_light_on() except AttributeError: - await ConnectionManager().broadcast_json({"IP": data["IP"], "text": "Fault light command failed, miner is not running BraiinsOS."}) + await ConnectionManager().broadcast_json( + { + "IP": data["IP"], + "text": "Fault light command failed, miner is not running BraiinsOS.", + } + ) except WebSocketDisconnect: ConnectionManager().disconnect(websocket) except RuntimeError: diff --git a/tools/web_testbench/feeds.py b/tools/web_testbench/feeds.py index 0427dde3..c39de8d0 100644 --- a/tools/web_testbench/feeds.py +++ b/tools/web_testbench/feeds.py @@ -147,6 +147,5 @@ async def get_local_versions(): return feeds_versions - if __name__ == "__main__": asyncio.get_event_loop().run_until_complete(update_installer_files())