From 9775af7bbabf604f6975423c9773093edccb4a3b Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Mon, 25 Nov 2019 03:33:16 +0800 Subject: [PATCH] Update security.py --- notebook/auth/security.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notebook/auth/security.py b/notebook/auth/security.py index 9d8d3ee2e..548e1d6df 100644 --- a/notebook/auth/security.py +++ b/notebook/auth/security.py @@ -118,9 +118,10 @@ def persist_config(config_file=None, mode=0o600): """ if config_file is None: - os.makedirs(jupyter_config_dir(), exist_ok=True) config_file = os.path.join(jupyter_config_dir(), 'jupyter_notebook_config.json') + os.makedirs(os.path.dirname(config_file), exist_ok=True) + loader = JSONFileConfigLoader(os.path.basename(config_file), os.path.dirname(config_file)) try: config = loader.load_config()