Skip to content

Commit c7b4739

Browse files
removed exit sys call for ConnectionRefusedError in _get_substrate (#2287)
* removed exit sys call for ConnectionRefusedError in _get_substrate * removed unnecessary sys import * ruff format fix
1 parent 5fcdcfd commit c7b4739

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bittensor/subtensor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import argparse
2727
import copy
2828
import socket
29-
import sys
3029
import time
3130
from typing import List, Dict, Union, Optional, Tuple, TypedDict, Any
3231

@@ -293,7 +292,7 @@ def _get_substrate(self):
293292
"You can check if you have connectivity by running this command: nc -vz localhost "
294293
f"{self.chain_endpoint.split(':')[2]}"
295294
)
296-
sys.exit(1)
295+
return
297296

298297
try:
299298
self.substrate.websocket.settimeout(self._connection_timeout)

0 commit comments

Comments
 (0)