(sources)
return base_files[0]
Given a set of sources, returns the one base.js file.

  Note that if zero or two or more base.js files are found, an error message
  will be written and the program will be exited.

  Args:
    sources: An iterable of _PathSource objects.

  Returns:
    The _PathSource representing the base Closure file.
Given a set of sources, returns the one base.js file.
Given a set of sources returns the one base . js file .
def _GetClosureBaseFile(sources):
  """Given a set of sources, returns the one base.js file.

  Note that if zero or two or more base.js files are found, an error message
  will be written and the program will be exited.

  Args:
    sources: An iterable of _PathSource objects.

  Returns:
    The _PathSource representing the base Closure file.
  """
  base_files = [
      js_source for js_source in sources if _IsClosureBaseFile(js_source)
  ]

  if not base_files:
    logging.error('No Closure base.js file found.')
    sys.exit(1)
  if len(base_files) > 1:
    logging.error('More than one Closure base.js files found at these paths:')
    for base_file in base_files:
      logging.error(base_file.GetPath())
    sys.exit(1)
  return base_files[0]
def _GetClosureBaseFile ( sources ) : base_files = [ js_source for js_source in sources if _IsClosureBaseFile ( js_source ) ] if not base_files : logging . error ( 'No Closure base.js file found.' ) sys . exit ( 1 ) if len ( base_files ) > 1 : logging . error ( 'More than one Closure base.js files found at these paths:' ) for base_file in base_files : logging . error ( base_file . GetPath ( ) ) sys . exit ( 1 ) return base_files [ 0 ]