Skip to content

safe __del__ #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025
Merged

safe __del__ #110

merged 1 commit into from
May 6, 2025

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