mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Merge pull request #5244 from minrk/test-ipc
try to avoid EADDRINUSE errors on travis
This commit is contained in:
commit
a9a0c71f75
@ -221,9 +221,14 @@ def run_webapp(q, ipydir, nbdir, loglevel=0):
|
|||||||
sys.stderr = open(os.devnull, 'w')
|
sys.stderr = open(os.devnull, 'w')
|
||||||
server = nbapp.NotebookApp()
|
server = nbapp.NotebookApp()
|
||||||
args = ['--no-browser']
|
args = ['--no-browser']
|
||||||
args.extend(['--ipython-dir', ipydir])
|
args.extend(['--ipython-dir', ipydir,
|
||||||
args.extend(['--notebook-dir', nbdir])
|
'--notebook-dir', nbdir,
|
||||||
args.extend(['--log-level', str(loglevel)])
|
'--log-level', str(loglevel),
|
||||||
|
])
|
||||||
|
# ipc doesn't work on Windows, and darwin has crazy-long temp paths,
|
||||||
|
# which run afoul of ipc's maximum path length.
|
||||||
|
if sys.platform.startswith('linux'):
|
||||||
|
args.append('--KernelManager.transport=ipc')
|
||||||
server.initialize(args)
|
server.initialize(args)
|
||||||
# communicate the port number to the parent process
|
# communicate the port number to the parent process
|
||||||
q.put(server.port)
|
q.put(server.port)
|
||||||
|
Loading…
Reference in New Issue
Block a user