From aa5696c90dfe92d6cafcccc1c08a6cea9acad506 2014-01-23 00:35:32 From: Paul Ivanov Date: 2014-01-23 00:35:32 Subject: [PATCH] don't raise error when config not found load_default_config would throw exception when IPYTHONDIR was set to some empty directory --- diff --git a/IPython/config/application.py b/IPython/config/application.py index 9014dd8..3b9a583 100644 --- a/IPython/config/application.py +++ b/IPython/config/application.py @@ -507,12 +507,10 @@ class Application(SingletonConfigurable): """ pyloader = PyFileConfigLoader(basefilename+'.py', path=path, log=log) jsonloader = JSONFileConfigLoader(basefilename+'.json', path=path, log=log) - config_found = False config = None for loader in [pyloader, jsonloader]: try: config = loader.load_config() - config_found = True except ConfigFileNotFound: pass except Exception: @@ -529,8 +527,6 @@ class Application(SingletonConfigurable): if config: yield config - if not config_found: - raise ConfigFileNotFound('Neither .json, nor .py config file found.') raise StopIteration