Skip to content

Commit 795686b

Browse files
committed
catch AttributeError in cleanup_connection_files
can be triggered during garbage collection (os.remove is destroyed before the KM instance)
1 parent 32413b9 commit 795686b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

IPython/kernel/kernelmanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ def cleanup_connection_file(self):
849849
self._connection_file_written = False
850850
try:
851851
os.remove(self.connection_file)
852-
except (IOError, OSError):
852+
except (IOError, OSError, AttributeError):
853853
pass
854854

855855
def cleanup_ipc_files(self):

0 commit comments

Comments
 (0)