Example #1
0
  def get_config(self):
    if not self.config_exists():
      return None

    config_obj = {}
    import_yaml(config_obj, self.yaml_path)
    return config_obj
Example #2
0
  def update_app_config(self, app_config):
    if os.path.exists(self.py_path):
      logger.debug('Applying config file: %s', self.py_path)
      app_config.from_pyfile(self.py_path)

    if os.path.exists(self.yaml_path):
      logger.debug('Applying config file: %s', self.yaml_path)
      import_yaml(app_config, self.yaml_path)