def GetFacterFacts():
  """Return facter contents.

  Returns:
    dict, facter contents
  """
  return_code, stdout, unused_stderr = Exec(
      FACTER_CMD, timeout=300, waitfor=0.5)
  if return_code != 0:
    return {}

  # Iterate over the facter output and create a dictionary of the contents.
  facts = {}
  for line in stdout.splitlines():
    try:
      key, unused_sep, value = line.split(' ', 2)
      value = value.strip()
      facts[key] = value
    except __HOLE__:
      logging.warning('Ignoring invalid facter output line: %s', line)
  return facts
dataset/ETHPy150Open google/simian/src/simian/mac/client/flight_common.py/GetFacterFacts