Skip to content

Commit

Permalink
Backport PR #5546: do not shutdown notebook if 'n' is part of answer
Browse files Browse the repository at this point in the history
this prevents commands like 'yesn' to shut down the notebook server
  • Loading branch information
minrk committed Apr 16, 2014
1 parent 0e2b7f9 commit 2ca528e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IPython/html/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ def _confirm_exit(self):
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
Expand Down

0 comments on commit 2ca528e

Please sign in to comment.