(setting, settings, error_msg, stderr=sys.stderr)
Verify that 'setting' is valid if it is generated from an exclusion list.

  If the setting appears to be generated from an exclusion list, the root name
  is checked.

  Args:
      setting:   A string that is the setting name to validate
      settings:  A dictionary where the keys are valid settings
      error_msg: The message to emit in the event of error
      stderr:    The stream receiving the error messages.
Verify that 'setting' is valid if it is generated from an exclusion list.
Verify that setting is valid if it is generated from an exclusion list .
def _ValidateExclusionSetting(setting, settings, error_msg, stderr=sys.stderr):
  """Verify that 'setting' is valid if it is generated from an exclusion list.

  If the setting appears to be generated from an exclusion list, the root name
  is checked.

  Args:
      setting:   A string that is the setting name to validate
      settings:  A dictionary where the keys are valid settings
      error_msg: The message to emit in the event of error
      stderr:    The stream receiving the error messages.
  """
  # This may be unrecognized because it's an exclusion list. If the
  # setting name has the _excluded suffix, then check the root name.
  unrecognized = True
  m = re.match(_EXCLUDED_SUFFIX_RE, setting)
  if m:
    root_setting = m.group(1)
    unrecognized = root_setting not in settings

  if unrecognized:
    # We don't know this setting. Give a warning.
    print >> stderr, error_msg
def _ValidateExclusionSetting ( setting , settings , error_msg , stderr = sys . stderr ) : # This may be unrecognized because it's an exclusion list. If the # setting name has the _excluded suffix, then check the root name. unrecognized = True m = re . match ( _EXCLUDED_SUFFIX_RE , setting ) if m : root_setting = m . group ( 1 ) unrecognized = root_setting not in settings if unrecognized : # We don't know this setting. Give a warning. print >> stderr , error_msg