read-only notebook mode #930

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+5 −5
Split
@@ -35,7 +35,7 @@
from IPython.config.application import Application
from IPython.config.configurable import Configurable
-from IPython.config.loader import Config
+from IPython.config.loader import Config, ConfigFileNotFound
from IPython.core import release, crashhandler
from IPython.core.profiledir import ProfileDir, ProfileDirError
from IPython.utils.path import get_ipython_dir, get_ipython_package_dir
@@ -186,7 +186,7 @@ def load_config_file(self, suppress_errors=True):
base_config,
path=self.config_file_paths
)
- except IOError:
+ except ConfigFileNotFound:
# ignore errors loading parent
self.log.debug("Config file %s not found", base_config)
pass
@@ -201,7 +201,7 @@ def load_config_file(self, suppress_errors=True):
self.config_file_name,
path=self.config_file_paths
)
- except IOError:
+ except ConfigFileNotFound:
# Only warn if the default config file was NOT being used.
if self.config_file_specified:
msg = self.log.warn
@@ -30,7 +30,7 @@
import sys
from IPython.config.loader import (
- Config, PyFileConfigLoader
+ Config, PyFileConfigLoader, ConfigFileNotFound
)
from IPython.config.application import boolean_flag
from IPython.core import release
@@ -378,7 +378,7 @@ def load_default_config(ipython_dir=None):
cl = PyFileConfigLoader(default_config_file_name, profile_dir)
try:
config = cl.load_config()
- except IOError:
+ except ConfigFileNotFound:
# no config found
config = Config()
return config