Skip to content

Conversation

thewhaleking
Copy link
Collaborator

Wraps the websocket closure in SubstrateInterface.__del__ in a try:except catch to ensure it doesn't raise wonky errors such as in the case of instantiating the object with _mock=True

Fixes #109

@thewhaleking thewhaleking requested a review from a team May 6, 2025 06:28
@thewhaleking thewhaleking linked an issue May 6, 2025 that may be closed by this pull request
@github-actions github-actions bot added run-bittensor-cli-tests Runs BTCLI tests. run-bittensor-sdk-tests Runs Bittensor SDK tests. labels May 6, 2025
@thewhaleking thewhaleking merged commit 9953486 into staging May 6, 2025
38 checks passed
@thewhaleking thewhaleking deleted the feat/thewhaleking/safe-del branch May 6, 2025 12:37
@ibraheem-abe ibraheem-abe mentioned this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-bittensor-cli-tests Runs BTCLI tests. run-bittensor-sdk-tests Runs Bittensor SDK tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix self.close in case _mock argument used.
2 participants