Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ipykernel/kernelapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ class IPKernelApp(BaseIPythonApplication, InteractiveShellApp,
# connection info:
connection_dir = Unicode()
def _connection_dir_default(self):
d = jupyter_runtime_dir()
ensure_dir_exists(d, 0o700)
return d
return jupyter_runtime_dir()

@property
def abs_connection_file(self):
Expand Down Expand Up @@ -201,7 +199,9 @@ def init_connection_file(self):
self.connection_file = filefind(self.connection_file, ['.', self.connection_dir])
except IOError:
self.log.debug("Connection file not found: %s", self.connection_file)
# This means I own it, so I will clean it up:
# This means I own it, and I'll create it in this directory:
ensure_dir_exists(os.path.dirname(self.abs_connection_file), 0o700)
# Also, I will clean it up:
atexit.register(self.cleanup_connection_file)
return
try:
Expand Down