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