Show More
@@ -500,8 +500,11 b' class Application(SingletonConfigurable):' | |||||
500 | self.extra_args = loader.extra_args |
|
500 | self.extra_args = loader.extra_args | |
501 |
|
501 | |||
502 | @classmethod |
|
502 | @classmethod | |
503 | def _load_config_file(cls, basefilename, path=None, log=None): |
|
503 | def _load_config_files(cls, basefilename, path=None, log=None): | |
504 |
"""Load config files (json |
|
504 | """Load config files (py,json) by filename and path. | |
|
505 | ||||
|
506 | yield each config object in turn. | |||
|
507 | """ | |||
505 |
|
508 | |||
506 | pyloader = PyFileConfigLoader(basefilename+'.py', path=path, log=log) |
|
509 | pyloader = PyFileConfigLoader(basefilename+'.py', path=path, log=log) | |
507 | jsonloader = JSONFileConfigLoader(basefilename+'.json', path=path, log=log) |
|
510 | jsonloader = JSONFileConfigLoader(basefilename+'.json', path=path, log=log) | |
@@ -534,7 +537,7 b' class Application(SingletonConfigurable):' | |||||
534 | def load_config_file(self, filename, path=None): |
|
537 | def load_config_file(self, filename, path=None): | |
535 | """Load config files (json/py) by filename and path.""" |
|
538 | """Load config files (json/py) by filename and path.""" | |
536 | filename, ext = os.path.splitext(filename) |
|
539 | filename, ext = os.path.splitext(filename) | |
537 | for config in self._load_config_file(filename, path=path , log=self.log): |
|
540 | for config in self._load_config_files(filename, path=path , log=self.log): | |
538 | self.update_config(config) |
|
541 | self.update_config(config) | |
539 |
|
542 | |||
540 |
|
543 |
@@ -375,7 +375,7 b' def load_default_config(ipython_dir=None):' | |||||
375 | profile_dir = os.path.join(ipython_dir, 'profile_default') |
|
375 | profile_dir = os.path.join(ipython_dir, 'profile_default') | |
376 |
|
376 | |||
377 | config = Config() |
|
377 | config = Config() | |
378 |
for cf in Application._load_config_file( |
|
378 | for cf in Application._load_config_files("ipython_config", path=profile_dir): | |
379 | config.update(cf) |
|
379 | config.update(cf) | |
380 |
|
380 | |||
381 | return config |
|
381 | return config |
General Comments 0
You need to be logged in to leave comments.
Login now