Skip to content

Commit

Permalink
allocated: bugfix: ignore errors from __del__
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed Feb 17, 2022
1 parent 0cac35f commit 80de260
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rpcclient/rpcclient/allocated.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ def __exit__(self, exc_type, exc_val, exc_tb):
self.deallocate()

def __del__(self):
self.deallocate()
try:
self.deallocate()
except Exception:
pass

@abstractmethod
def _deallocate(self):
Expand Down

0 comments on commit 80de260

Please sign in to comment.