File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1490,10 +1490,13 @@ def init_webapp(self):
14901490 self .http_server .listen (port , self .ip )
14911491 except socket .error as e :
14921492 if e .errno == errno .EADDRINUSE :
1493- self .log .info (_ ('The port %i is already in use, trying another port.' ) % port )
1493+ if self .port_retries :
1494+ self .log .info (_ ('The port %i is already in use, trying another port.' ) % port )
1495+ else :
1496+ self .log .info (_ ('The port %i is already in use.' ) % port )
14941497 continue
14951498 elif e .errno in (errno .EACCES , getattr (errno , 'WSAEACCES' , errno .EACCES )):
1496- self .log .warning (_ ("Permission to listen on port %i denied" ) % port )
1499+ self .log .warning (_ ("Permission to listen on port %i denied. " ) % port )
14971500 continue
14981501 else :
14991502 raise
@@ -1502,8 +1505,12 @@ def init_webapp(self):
15021505 success = True
15031506 break
15041507 if not success :
1505- self .log .critical (_ ('ERROR: the notebook server could not be started because '
1508+ if self .port_retries :
1509+ self .log .critical (_ ('ERROR: the notebook server could not be started because '
15061510 'no available port could be found.' ))
1511+ else :
1512+ self .log .critical (_ ('ERROR: the notebook server could not be started because '
1513+ 'port %i is not available.' ) % port )
15071514 self .exit (1 )
15081515
15091516 @property
You can’t perform that action at this time.
0 commit comments