Skip to content

Commit a715321

Browse files
authored
Merge pull request #479 from jtpio/answer-yes
Re-enable support for answer_yes flag
2 parents dc2a5b5 + 9fb3729 commit a715321

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

jupyter_server/serverapp.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,13 @@ def _confirm_exit(self):
16181618
"""
16191619
info = self.log.info
16201620
info(_i18n('interrupted'))
1621+
# Check if answer_yes is set
1622+
if self.answer_yes:
1623+
self.log.critical(_("Shutting down..."))
1624+
# schedule stop on the main thread,
1625+
# since this might be called from a signal handler
1626+
self.io_loop.add_callback_from_signal(self.io_loop.stop)
1627+
return
16211628
print(self.running_server_info())
16221629
yes = _i18n('y')
16231630
no = _i18n('n')

0 commit comments

Comments
 (0)