From 8d751c4832d6af4378cda325fc586f3a42b54e94 Mon Sep 17 00:00:00 2001 From: drunest Date: Thu, 19 Sep 2024 14:46:40 -0500 Subject: [PATCH] fix: fix mistype assgnment --- src/bt_auto_dumper/_v2/__main__.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/bt_auto_dumper/_v2/__main__.py b/src/bt_auto_dumper/_v2/__main__.py index 2c8e5e1..d0d74b1 100644 --- a/src/bt_auto_dumper/_v2/__main__.py +++ b/src/bt_auto_dumper/_v2/__main__.py @@ -5,7 +5,7 @@ import time import zipfile -import bittensor as bt +import bittensor as bt # type: ignore import requests @@ -29,16 +29,12 @@ def dump_and_upload(walletname, wallethotkey, subnet_identifier: str, autovalida "omron": ["echo 'Mainnet Command 1'", "echo 'Mainnet Command 2'"], } wallet = bt.wallet(name=walletname, hotkey=wallethotkey) - commands = {} - for subnet_id, command in subnets.items(): - if subnet_id == subnet_identifier: - commands[subnet_id] = command - break + if subnet_identifier in subnets: + commands = {subnet_identifier: subnets[subnet_identifier]} if not commands: print(f"Subnet identifier {subnet_identifier} not found.") return - output_files = [] for subnet_id, cmds in commands.items(): for i, command in enumerate(cmds, start=1):