Show More
@@ -439,20 +439,18 b' class KernelManager(HasTraits):' | |||||
439 | If random ports (port=0) are being used, this method must be called |
|
439 | If random ports (port=0) are being used, this method must be called | |
440 | before the channels are created. |
|
440 | before the channels are created. | |
441 | """ |
|
441 | """ | |
442 | xreq, sub = self.xreq_address, self.sub_address |
|
442 | xreq, sub, rep = self.xreq_address, self.sub_address, self.rep_address | |
443 | if xreq[0] != LOCALHOST or sub[0] != LOCALHOST: |
|
443 | if xreq[0] != LOCALHOST or sub[0] != LOCALHOST or rep[0] != LOCALHOST: | |
444 | raise RuntimeError("Can only launch a kernel on localhost." |
|
444 | raise RuntimeError("Can only launch a kernel on localhost." | |
445 | "Make sure that the '*_address' attributes are " |
|
445 | "Make sure that the '*_address' attributes are " | |
446 | "configured properly.") |
|
446 | "configured properly.") | |
447 |
|
447 | |||
448 |
kernel, xrep, pub = launch_kernel( |
|
448 | kernel, xrep, pub, req = launch_kernel( | |
|
449 | xrep_port=xreq[1], pub_port=sub[1], req_port=rep[1]) | |||
449 | self._kernel = kernel |
|
450 | self._kernel = kernel | |
450 | self._xreq_address = (LOCALHOST, xrep) |
|
451 | self._xreq_address = (LOCALHOST, xrep) | |
451 | self._sub_address = (LOCALHOST, pub) |
|
452 | self._sub_address = (LOCALHOST, pub) | |
452 | # The rep channel is not fully working yet, but its base class makes |
|
453 | self._rep_address = (LOCALHOST, req) | |
453 | # sure the port is not 0. We set to -1 for now until the rep channel |
|
|||
454 | # is fully working. |
|
|||
455 | self._rep_address = (LOCALHOST, -1) |
|
|||
456 |
|
454 | |||
457 | @property |
|
455 | @property | |
458 | def has_kernel(self): |
|
456 | def has_kernel(self): |
General Comments 0
You need to be logged in to leave comments.
Login now