Skip to content

Commit d0cf9a3

Browse files
committed
Fixes #109
1 parent ffde983 commit d0cf9a3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

async_substrate_interface/sync_substrate.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,10 @@ def __enter__(self):
532532
return self
533533

534534
def __del__(self):
535-
self.ws.close()
536-
print("DELETING SUBSTATE")
535+
try:
536+
self.ws.close()
537+
except AttributeError:
538+
pass
537539
# self.ws.protocol.fail(code=1006) # ABNORMAL_CLOSURE
538540

539541
def initialize(self):

0 commit comments

Comments
 (0)