##// END OF EJS Templates
Final cleanup of kernelmanager...
Brian E. Granger -
Show More
@@ -709,6 +709,7 b' class KernelManager(Configurable):'
709 709
710 710 def __del__(self):
711 711 self.cleanup_connection_file()
712 self.cleanup_ipc_files()
712 713
713 714 #--------------------------------------------------------------------------
714 715 # Channel management methods:
@@ -805,7 +806,7 b' class KernelManager(Configurable):'
805 806 return self._hb_channel
806 807
807 808 #--------------------------------------------------------------------------
808 # Connection and ipc file management.
809 # Connection and ipc file management
809 810 #--------------------------------------------------------------------------
810 811
811 812 def cleanup_connection_file(self):
@@ -821,8 +822,6 b' class KernelManager(Configurable):'
821 822 except (IOError, OSError):
822 823 pass
823 824
824 self.cleanup_ipc_files()
825
826 825 def cleanup_ipc_files(self):
827 826 """Cleanup ipc files if we wrote them."""
828 827 if self.transport != 'ipc':
@@ -866,7 +865,7 b' class KernelManager(Configurable):'
866 865 self._connection_file_written = True
867 866
868 867 #--------------------------------------------------------------------------
869 # Kernel management.
868 # Kernel management
870 869 #--------------------------------------------------------------------------
871 870
872 871 def start_kernel(self, **kw):
@@ -949,6 +948,7 b' class KernelManager(Configurable):'
949 948
950 949 if not restart:
951 950 self.cleanup_connection_file()
951 self.cleanup_ipc_files()
952 952 else:
953 953 self.cleanup_ipc_files()
954 954
@@ -161,7 +161,7 b' class KernelManagerABC(object):'
161 161 pass
162 162
163 163 #--------------------------------------------------------------------------
164 # Channel management methods:
164 # Channel management methods
165 165 #--------------------------------------------------------------------------
166 166
167 167 @abc.abstractmethod
@@ -193,7 +193,7 b' class KernelManagerABC(object):'
193 193 pass
194 194
195 195 #--------------------------------------------------------------------------
196 # Kernel management.
196 # Kernel management
197 197 #--------------------------------------------------------------------------
198 198
199 199 @abc.abstractmethod
@@ -223,3 +223,4 b' class KernelManagerABC(object):'
223 223 @abc.abstractproperty
224 224 def is_alive(self):
225 225 pass
226
@@ -1,4 +1,4 b''
1 """Tests for the notebook kernel and session manager."""
1 """Tests for the notebook kernel and session manager"""
2 2
3 3 from subprocess import PIPE
4 4 import time
General Comments 0
You need to be logged in to leave comments. Login now