Skip to content

Commit

Permalink
Merge pull request #5941 from afshin/answer-yes
Browse files Browse the repository at this point in the history
Re-enable support for answer_yes flag
  • Loading branch information
Zsailer authored Jan 14, 2021
2 parents 1cb0c05 + b6297d0 commit f6966e4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions notebook/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,13 @@ def _confirm_exit(self):
"""
info = self.log.info
info(_('interrupted'))
# Check if answer_yes is set
if self.answer_yes:
self.log.critical(_("Shutting down..."))
# schedule stop on the main thread,
# since this might be called from a signal handler
self.io_loop.add_callback_from_signal(self.io_loop.stop)
return
print(self.notebook_info())
yes = _('y')
no = _('n')
Expand Down

0 comments on commit f6966e4

Please sign in to comment.