Skip to content

Commit 806904c

Browse files
authored
Merge pull request #5078 from haobibo/patch-1
Ensure jupyter config dir exist
2 parents 6c67bb1 + 9775af7 commit 806904c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

notebook/auth/security.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ def persist_config(config_file=None, mode=0o600):
120120
if config_file is None:
121121
config_file = os.path.join(jupyter_config_dir(), 'jupyter_notebook_config.json')
122122

123+
os.makedirs(os.path.dirname(config_file), exist_ok=True)
124+
123125
loader = JSONFileConfigLoader(os.path.basename(config_file), os.path.dirname(config_file))
124126
try:
125127
config = loader.load_config()

0 commit comments

Comments
 (0)