Skip to content

Commit eaf5d8b

Browse files
committed
Merge pull request #50 from aburgm/write-then-log
Write connection file before writing its location to the log
2 parents 0c4f49c + 226882c commit eaf5d8b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ipykernel/kernelapp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,10 @@ def initialize(self, argv=None):
373373
self.init_sockets()
374374
self.init_heartbeat()
375375
# writing/displaying connection info must be *after* init_sockets/heartbeat
376-
self.log_connection_info()
377376
self.write_connection_file()
377+
# Log connection info after writing connection file, so that the connection
378+
# file is definitely available at the time someone reads the log.
379+
self.log_connection_info()
378380
self.init_io()
379381
self.init_signal()
380382
self.init_kernel()

0 commit comments

Comments
 (0)