From 7bb30186427a65b23d11bf4e1272dc36490f6b10 2013-11-12 19:16:44 From: MinRK Date: 2013-11-12 19:16:44 Subject: [PATCH] only shutdown kernel when it is owned by the console --- diff --git a/IPython/terminal/console/interactiveshell.py b/IPython/terminal/console/interactiveshell.py index 9e95b11..5899ddc 100644 --- a/IPython/terminal/console/interactiveshell.py +++ b/IPython/terminal/console/interactiveshell.py @@ -121,7 +121,7 @@ class ZMQTerminalInteractiveShell(TerminalInteractiveShell): This creates completion machinery that can be used by client code, either interactively in-process (typically triggered by the readline - library), programatically (such as in test suites) or out-of-prcess + library), programmatically (such as in test suites) or out-of-process (typically over the network by remote frontends). """ from IPython.core.completerlib import (module_completer, @@ -143,7 +143,7 @@ class ZMQTerminalInteractiveShell(TerminalInteractiveShell): def ask_exit(self): super(ZMQTerminalInteractiveShell, self).ask_exit() - if self.exit_now: + if self.exit_now and self.manager: self.client.shutdown() def run_cell(self, cell, store_history=True):