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 @@ -1570,13 +1570,14 @@ def cleanup_kernels(self):
1570
1570
self .log .info (kernel_msg % n_kernels )
1571
1571
self .kernel_manager .shutdown_all ()
1572
1572
1573
- def notebook_info (self ):
1573
+ def notebook_info (self , kernel_count = True ):
1574
1574
"Return the current working directory and the server url information"
1575
1575
info = self .contents_manager .info_string () + "\n "
1576
- n_kernels = len (self .kernel_manager .list_kernel_ids ())
1577
- kernel_msg = trans .ngettext ("%d active kernel" , "%d active kernels" , n_kernels )
1578
- info += kernel_msg % n_kernels
1579
- info += "\n "
1576
+ if kernel_count :
1577
+ n_kernels = len (self .kernel_manager .list_kernel_ids ())
1578
+ kernel_msg = trans .ngettext ("%d active kernel" , "%d active kernels" , n_kernels )
1579
+ info += kernel_msg % n_kernels
1580
+ info += "\n "
1580
1581
# Format the info so that the URL fits on a single line in 80 char display
1581
1582
info += _ ("The Jupyter Notebook is running at:\n %s" ) % self .display_url
1582
1583
return info
@@ -1633,7 +1634,7 @@ def start(self):
1633
1634
self .exit (1 )
1634
1635
1635
1636
info = self .log .info
1636
- for line in self .notebook_info ().split ("\n " ):
1637
+ for line in self .notebook_info (kernel_count = False ).split ("\n " ):
1637
1638
info (line )
1638
1639
info (_ ("Use Control-C to stop this server and shut down all kernels (twice to skip confirmation)." ))
1639
1640
if 'dev' in notebook .__version__ :
You can’t perform that action at this time.
0 commit comments