Skip to content

Commit 6d975c3

Browse files
committed
Error handling
1 parent b959fe3 commit 6d975c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bittensor_cli/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,8 @@ async def _run():
11501150
exit_early is True
11511151
): # temporarily to handle multiple run commands in one session
11521152
try:
1153-
await self.subtensor.substrate.close()
1153+
if self.subtensor:
1154+
await self.subtensor.substrate.close()
11541155
raise typer.Exit()
11551156
except Exception as e: # ensures we always exit cleanly
11561157
if not isinstance(e, (typer.Exit, RuntimeError)):

0 commit comments

Comments
 (0)