def _ParseAndValidateServerYamls(self, yaml_paths):
    results = []
    app_id = None
    last_yaml_path = None
    for yaml_path in yaml_paths:
      if not os.path.isfile(yaml_path):
        _PrintErrorAndExit(
            self.error_fh,
            ("Error: The given path '%s' is not to a YAML configuration "
             "file.\n") % yaml_path)
      file_name = os.path.basename(yaml_path)
      base_path = os.path.dirname(yaml_path)
      if not base_path:
        base_path = '.'
      server_yaml = self._ParseAppInfoFromYaml(base_path,
                                               os.path.splitext(file_name)[0])

      if not server_yaml.server and file_name != 'app.yaml':
        _PrintErrorAndExit(
            self.error_fh,
            "Error: 'server' parameter not specified in %s" % yaml_path)



      if app_id is not None and server_yaml.application != app_id:
        _PrintErrorAndExit(
            self.error_fh,
            "Error: 'application' value '%s' in %s does not match the value "
            "'%s', found in %s" % (server_yaml.application,
                                   yaml_path,
                                   app_id,
                                   last_yaml_path))
      app_id = server_yaml.application
      last_yaml_path = yaml_path
      results.append(server_yaml)

    return results
Validates given yaml paths and returns the parsed yaml objects.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/appcfg.py/AppCfgApp._ParseAndValidateServerYamls