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