From 08234cae3d6b54024f78748c7052b944cf039dc7 2014-04-07 09:17:11 From: Renaud Richardet Date: 2014-04-07 09:17:11 Subject: [PATCH] do not shutdown notebook if 'n' is part of answer this prevents commands like 'yesn' to shut down the notebook server --- diff --git a/IPython/html/notebookapp.py b/IPython/html/notebookapp.py index 81fda2d..91f7e6a 100644 --- a/IPython/html/notebookapp.py +++ b/IPython/html/notebookapp.py @@ -708,7 +708,7 @@ class NotebookApp(BaseIPythonApplication): r,w,x = select.select([sys.stdin], [], [], 5) if r: line = sys.stdin.readline() - if line.lower().startswith('y'): + if line.lower().startswith('y') and 'n' not in line.lower(): self.log.critical("Shutdown confirmed") ioloop.IOLoop.instance().stop() return