##// END OF EJS Templates
catch EACCES when binding notebook app...
MinRK -
Show More
@@ -590,9 +590,14 b' class NotebookApp(BaseIPythonApplication):'
590 break
590 break
591 # restore the monekypatch
591 # restore the monekypatch
592 socket.AI_ADDRCONFIG = saved_AI_ADDRCONFIG
592 socket.AI_ADDRCONFIG = saved_AI_ADDRCONFIG
593 if e.errno != errno.EADDRINUSE:
593 if e.errno == errno.EADDRINUSE:
594 raise
595 self.log.info('The port %i is already in use, trying another random port.' % port)
594 self.log.info('The port %i is already in use, trying another random port.' % port)
595 continue
596 elif e.errno in (errno.EACCES, getattr(errno, 'WSAEACCES', errno.EACCES)):
597 self.log.warn("Permission to listen on port %i denied" % port)
598 continue
599 else:
600 raise
596 else:
601 else:
597 self.port = port
602 self.port = port
598 success = True
603 success = True
General Comments 0
You need to be logged in to leave comments. Login now