##// END OF EJS Templates
Fixed inconsistent usage of has_kernel in KernelManager.
Brian Granger -
Show More
@@ -798,7 +798,7 b' class KernelManager(HasTraits):'
798
798
799 def kill_kernel(self):
799 def kill_kernel(self):
800 """ Kill the running kernel. """
800 """ Kill the running kernel. """
801 if self.kernel is not None:
801 if self.has_kernel:
802 self.kernel.kill()
802 self.kernel.kill()
803 self.kernel = None
803 self.kernel = None
804 else:
804 else:
@@ -806,7 +806,7 b' class KernelManager(HasTraits):'
806
806
807 def signal_kernel(self, signum):
807 def signal_kernel(self, signum):
808 """ Sends a signal to the kernel. """
808 """ Sends a signal to the kernel. """
809 if self.kernel is not None:
809 if self.has_kernel:
810 self.kernel.send_signal(signum)
810 self.kernel.send_signal(signum)
811 else:
811 else:
812 raise RuntimeError("Cannot signal kernel. No kernel is running!")
812 raise RuntimeError("Cannot signal kernel. No kernel is running!")
@@ -816,7 +816,7 b' class KernelManager(HasTraits):'
816 """Is the kernel process still running?"""
816 """Is the kernel process still running?"""
817 # FIXME: not using a heartbeat means this method is broken for any
817 # FIXME: not using a heartbeat means this method is broken for any
818 # remote kernel, it's only capable of handling local kernels.
818 # remote kernel, it's only capable of handling local kernels.
819 if self.kernel is not None:
819 if self.has_kernel:
820 if self.kernel.poll() is None:
820 if self.kernel.poll() is None:
821 return True
821 return True
822 else:
822 else:
General Comments 0
You need to be logged in to leave comments. Login now