Show More
@@ -23,7 +23,7 b' from subprocess import Popen, PIPE' | |||
|
23 | 23 | import nose.tools as nt |
|
24 | 24 | |
|
25 | 25 | from IPython.zmq.blockingkernelmanager import BlockingKernelManager |
|
26 | from IPython.utils import path | |
|
26 | from IPython.utils import path, py3compat | |
|
27 | 27 | |
|
28 | 28 | |
|
29 | 29 | #------------------------------------------------------------------------------- |
@@ -68,17 +68,19 b' def setup_kernel(cmd):' | |||
|
68 | 68 | ) |
|
69 | 69 | # wait for connection file to exist, timeout after 5s |
|
70 | 70 | tic = time.time() |
|
71 |
while not os.path.exists(connection_file) and kernel.poll() is None and time.time() < tic + |
|
|
71 | while not os.path.exists(connection_file) and kernel.poll() is None and time.time() < tic + 10: | |
|
72 | 72 | time.sleep(0.1) |
|
73 | 73 | |
|
74 | if kernel.poll() is not None: | |
|
75 | o,e = kernel.communicate() | |
|
76 | e = py3compat.cast_unicode(e) | |
|
77 | raise IOError("Kernel failed to start:\n%s" % e) | |
|
78 | ||
|
74 | 79 | if not os.path.exists(connection_file): |
|
75 | 80 | if kernel.poll() is None: |
|
76 | 81 | kernel.terminate() |
|
77 | 82 | raise IOError("Connection file %r never arrived" % connection_file) |
|
78 | 83 | |
|
79 | if kernel.poll() is not None: | |
|
80 | raise IOError("Kernel failed to start") | |
|
81 | ||
|
82 | 84 | km = BlockingKernelManager(connection_file=connection_file) |
|
83 | 85 | km.load_connection_file() |
|
84 | 86 | km.start_channels() |
General Comments 0
You need to be logged in to leave comments.
Login now