Don't show number of active kernels on notebook start

This commit is contained in:
Thomas Kluyver 2018-06-17 11:40:34 +02:00
parent 39168030d6
commit 5e9915609b

View File

@ -1552,9 +1552,10 @@ class NotebookApp(JupyterApp):
self.log.info(kernel_msg % n_kernels)
self.kernel_manager.shutdown_all()
def notebook_info(self):
def notebook_info(self, kernel_count=True):
"Return the current working directory and the server url information"
info = self.contents_manager.info_string() + "\n"
if kernel_count:
n_kernels = len(self.kernel_manager.list_kernel_ids())
kernel_msg = trans.ngettext("%d active kernel", "%d active kernels", n_kernels)
info += kernel_msg % n_kernels
@ -1615,7 +1616,7 @@ class NotebookApp(JupyterApp):
self.exit(1)
info = self.log.info
for line in self.notebook_info().split("\n"):
for line in self.notebook_info(kernel_count=False).split("\n"):
info(line)
info(_("Use Control-C to stop this server and shut down all kernels (twice to skip confirmation)."))
if 'dev' in notebook.__version__: