##// END OF EJS Templates
Small fix for API consistency.
epatters -
Show More
@@ -282,7 +282,7 b' def bind_port(socket, ip, port):'
282 port is chosen. Returns the port that was bound.
282 port is chosen. Returns the port that was bound.
283 """
283 """
284 connection = 'tcp://%s' % ip
284 connection = 'tcp://%s' % ip
285 if port < 0:
285 if port <= 0:
286 port = socket.bind_to_random_port(connection)
286 port = socket.bind_to_random_port(connection)
287 else:
287 else:
288 connection += ':%i' % port
288 connection += ':%i' % port
@@ -341,6 +341,7 b' def main():'
341 # Start the kernel mainloop.
341 # Start the kernel mainloop.
342 kernel.start()
342 kernel.start()
343
343
344
344 def launch_kernel(xrep_port=0, pub_port=0, req_port=0, independent=False):
345 def launch_kernel(xrep_port=0, pub_port=0, req_port=0, independent=False):
345 """ Launches a localhost kernel, binding to the specified ports.
346 """ Launches a localhost kernel, binding to the specified ports.
346
347
General Comments 0
You need to be logged in to leave comments. Login now