@@ -1145,11 +1145,6 @@ def _observe_contents_manager_class(self, change):
1145
1145
"until its next major release (2.x)."
1146
1146
)
1147
1147
1148
- @observe ('notebook_dir' )
1149
- def _update_notebook_dir (self , change ):
1150
- self .log .warning (_i18n ("notebook_dir is deprecated, use root_dir" ))
1151
- self .root_dir = change ['new' ]
1152
-
1153
1148
kernel_manager_class = Type (
1154
1149
default_value = AsyncMappingKernelManager ,
1155
1150
klass = MappingKernelManager ,
@@ -1767,7 +1762,10 @@ def init_httpserver(self):
1767
1762
self .http_server .listen (port , self .ip )
1768
1763
except socket .error as e :
1769
1764
if e .errno == errno .EADDRINUSE :
1770
- self .log .info (_i18n ('The port %i is already in use, trying another port.' ) % port )
1765
+ if self .port_retries :
1766
+ self .log .info (_i18n ('The port %i is already in use, trying another port.' ) % port )
1767
+ else :
1768
+ self .log .info (_i18n ('The port %i is already in use.' ) % port )
1771
1769
continue
1772
1770
elif e .errno in (errno .EACCES , getattr (errno , 'WSAEACCES' , errno .EACCES )):
1773
1771
self .log .warning (_i18n ("Permission to listen on port %i denied" ) % port )
@@ -1779,8 +1777,12 @@ def init_httpserver(self):
1779
1777
success = True
1780
1778
break
1781
1779
if not success :
1782
- self .log .critical (_i18n ('ERROR: the Jupyter server could not be started because '
1780
+ if self .port_retries :
1781
+ self .log .critical (_i18n ('ERROR: the notebook server could not be started because '
1783
1782
'no available port could be found.' ))
1783
+ else :
1784
+ self .log .critical (_i18n ('ERROR: the notebook server could not be started because '
1785
+ 'port %i is not available.' ) % port )
1784
1786
self .exit (1 )
1785
1787
1786
1788
@staticmethod
0 commit comments