File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -1552,13 +1552,14 @@ def cleanup_kernels(self):
1552
1552
self .log .info (kernel_msg % n_kernels )
1553
1553
self .kernel_manager .shutdown_all ()
1554
1554
1555
- def notebook_info (self ):
1555
+ def notebook_info (self , kernel_count = True ):
1556
1556
"Return the current working directory and the server url information"
1557
1557
info = self .contents_manager .info_string () + "\n "
1558
- n_kernels = len (self .kernel_manager .list_kernel_ids ())
1559
- kernel_msg = trans .ngettext ("%d active kernel" , "%d active kernels" , n_kernels )
1560
- info += kernel_msg % n_kernels
1561
- info += "\n "
1558
+ if kernel_count :
1559
+ n_kernels = len (self .kernel_manager .list_kernel_ids ())
1560
+ kernel_msg = trans .ngettext ("%d active kernel" , "%d active kernels" , n_kernels )
1561
+ info += kernel_msg % n_kernels
1562
+ info += "\n "
1562
1563
# Format the info so that the URL fits on a single line in 80 char display
1563
1564
info += _ ("The Jupyter Notebook is running at:\n %s" ) % self .display_url
1564
1565
return info
@@ -1615,7 +1616,7 @@ def start(self):
1615
1616
self .exit (1 )
1616
1617
1617
1618
info = self .log .info
1618
- for line in self .notebook_info ().split ("\n " ):
1619
+ for line in self .notebook_info (kernel_count = False ).split ("\n " ):
1619
1620
info (line )
1620
1621
info (_ ("Use Control-C to stop this server and shut down all kernels (twice to skip confirmation)." ))
1621
1622
if 'dev' in notebook .__version__ :
You can’t perform that action at this time.
0 commit comments