From e0b5ff65ecf3a3ec69a842752294f5705a4691f3 2013-12-06 16:23:00 From: Matthias BUSSONNIER Date: 2013-12-06 16:23:00 Subject: [PATCH] fix plural and embeded --- diff --git a/IPython/config/application.py b/IPython/config/application.py index d431fdf..a6bda10 100644 --- a/IPython/config/application.py +++ b/IPython/config/application.py @@ -500,8 +500,11 @@ class Application(SingletonConfigurable): self.extra_args = loader.extra_args @classmethod - def _load_config_file(cls, basefilename, path=None, log=None): - """Load config files (json/py) by filename and path.""" + def _load_config_files(cls, basefilename, path=None, log=None): + """Load config files (py,json) by filename and path. + + yield each config object in turn. + """ pyloader = PyFileConfigLoader(basefilename+'.py', path=path, log=log) jsonloader = JSONFileConfigLoader(basefilename+'.json', path=path, log=log) @@ -534,7 +537,7 @@ class Application(SingletonConfigurable): def load_config_file(self, filename, path=None): """Load config files (json/py) by filename and path.""" filename, ext = os.path.splitext(filename) - for config in self._load_config_file(filename, path=path , log=self.log): + for config in self._load_config_files(filename, path=path , log=self.log): self.update_config(config) diff --git a/IPython/terminal/ipapp.py b/IPython/terminal/ipapp.py index 6026a2f..6e66863 100755 --- a/IPython/terminal/ipapp.py +++ b/IPython/terminal/ipapp.py @@ -375,7 +375,7 @@ def load_default_config(ipython_dir=None): profile_dir = os.path.join(ipython_dir, 'profile_default') config = Config() - for cf in Application._load_config_file(filename[:-3], path=profile_dir, log=None): + for cf in Application._load_config_files("ipython_config", path=profile_dir): config.update(cf) return config