def mac_init(options, skip_version_check=False):
  try:
    setup = setuputil.mac.MacSetup(options, skip_version_check)
    return setup
  except setuputil.common.VersionUnsupportedError as e:
    logging.error("Your version of Mac OS (" + e.version + ") is not supported "
                  "by this script.")
    raise e
  except setuputil.common.VersionTooHighError as e:
    logging.error("Your version of OS X (" + e.version + ") is higher than "
                  "this setup script supports.\nPlease quit now and update the "
                  "script, or attempt installation for the highest supported "
                  "OS X version (10.11 El Capitan).")
    if raw_input("Continue? (y/n): ").lower().startswith("y"):
      return mac_init(options, skip_version_check=True)
    else:
      raise e
  except setuputil.mac.VersionTooLowError as e:
    logging.error("Your version of OS X (" + e.version + ") is not reliably "
                  "supported.")
    if raw_input("Attempt installation for the lowest supported OS X version "
                 "(10.4 Tiger)? (y/n): ").lower().startswith("y"):
      return mac_init(options, skip_version_check=True)
    else:
      raise e
  except setuputil.common.BadDirectoryError as e:
    logging.error("Directory given for flag " + e.flag + " does not exist.\n"
                  "Please check " + e.directory + " and try again.")
    raise e
  return None
Get method of obtaining IPv4 configuration on given setting
dataset/ETHPy150Open google/fplutil/bin/setup_all_prereqs.py/mac_init--crossover with--dataset/ETHPy150Open openlmi/openlmi-scripts/commands/networking/lmi/scripts/networking/__init__.py/get_setting_ip4_method