##// END OF EJS Templates
catch ConfigFileNotFound where appropriate...
MinRK -
Show More
@@ -35,7 +35,7 b' import sys'
35 35
36 36 from IPython.config.application import Application
37 37 from IPython.config.configurable import Configurable
38 from IPython.config.loader import Config
38 from IPython.config.loader import Config, ConfigFileNotFound
39 39 from IPython.core import release, crashhandler
40 40 from IPython.core.profiledir import ProfileDir, ProfileDirError
41 41 from IPython.utils.path import get_ipython_dir, get_ipython_package_dir
@@ -186,7 +186,7 b' class BaseIPythonApplication(Application):'
186 186 base_config,
187 187 path=self.config_file_paths
188 188 )
189 except IOError:
189 except ConfigFileNotFound:
190 190 # ignore errors loading parent
191 191 self.log.debug("Config file %s not found", base_config)
192 192 pass
@@ -201,7 +201,7 b' class BaseIPythonApplication(Application):'
201 201 self.config_file_name,
202 202 path=self.config_file_paths
203 203 )
204 except IOError:
204 except ConfigFileNotFound:
205 205 # Only warn if the default config file was NOT being used.
206 206 if self.config_file_specified:
207 207 msg = self.log.warn
@@ -30,7 +30,7 b' import os'
30 30 import sys
31 31
32 32 from IPython.config.loader import (
33 Config, PyFileConfigLoader
33 Config, PyFileConfigLoader, ConfigFileNotFound
34 34 )
35 35 from IPython.config.application import boolean_flag
36 36 from IPython.core import release
@@ -378,7 +378,7 b' def load_default_config(ipython_dir=None):'
378 378 cl = PyFileConfigLoader(default_config_file_name, profile_dir)
379 379 try:
380 380 config = cl.load_config()
381 except IOError:
381 except ConfigFileNotFound:
382 382 # no config found
383 383 config = Config()
384 384 return config
General Comments 0
You need to be logged in to leave comments. Login now