Skip to content

Commit 6968ef3

Browse files
committed
FIX skip __del__ if not defined
1 parent 2a1b8d7 commit 6968ef3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

loky/backend/resource_tracker.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ def ensure_running(self):
174174
def __del__(self):
175175
# ignore error due to trying to clean up child process which has already been
176176
# shutdown on windows See https://github.com/joblib/loky/pull/450
177+
# This is only required if __del__ is defined
178+
if not hasattr(self, "__del__"):
179+
return
177180
try:
178181
super().__del__()
179182
except ChildProcessError:

0 commit comments

Comments
 (0)