##// END OF EJS Templates
don't crash on bad config files
MinRK -
Show More
@@ -366,8 +366,13 b' class Application(SingletonConfigurable):'
366 def load_config_file(self, filename, path=None):
366 def load_config_file(self, filename, path=None):
367 """Load a .py based config file by filename and path."""
367 """Load a .py based config file by filename and path."""
368 loader = PyFileConfigLoader(filename, path=path)
368 loader = PyFileConfigLoader(filename, path=path)
369 config = loader.load_config()
369 try:
370 self.update_config(config)
370 config = loader.load_config()
371 except Exception:
372 self.log.error("Exception while loading config file %s [path=%s]"%
373 (filename, path), exc_info=True)
374 else:
375 self.update_config(config)
371
376
372 def generate_config_file(self):
377 def generate_config_file(self):
373 """generate default config file from Configurables"""
378 """generate default config file from Configurables"""
General Comments 0
You need to be logged in to leave comments. Login now