grr/server/grr_response_server/stats_store.py
def _ValidateFieldValues(field_values,
                         metadata):
  """Checks that the given sequence of field values is valid.

  Args:
    field_values: A sequence of values for a particular metric's fields.
    metadata: MetricMetadata for the metric. The order of fields in the metadata
      should match the field values.

  Raises:
    ValueError: If the number of field values doesn't match the number
      of fields the metric has.
  """
  # Field values are always arranged in the order in which the
  # the respective fields are defined in metadata.
  if len(field_values) != len(metadata.fields_defs):
    raise ValueError(
        "Value for metric %s has %d field values, yet the metric "
        "was defined to have %d fields." %
        (metadata.metric_name, len(field_values), len(metadata.field_defs)))
Checks that the given sequence of field values is valid.

  Args:
    field_values: A sequence of values for a particular metric's fields.
    metadata: MetricMetadata for the metric. The order of fields in the metadata
      should match the field values.

  Raises:
    ValueError: If the number of field values doesn't match the number
      of fields the metric has.
  
Checks that the given sequence of field values is valid.
Checks that the given sequence of field values is valid .
def _ValidateFieldValues(field_values,
                         metadata):
  if len(field_values) != len(metadata.fields_defs):
    raise ValueError(
        "Value for metric %s has %d field values, yet the metric "
        "was defined to have %d fields." %
        (metadata.metric_name, len(field_values), len(metadata.field_defs)))
def _ValidateFieldValues ( field_values , metadata ) : if len ( field_values ) != len ( metadata . fields_defs ) : raise ValueError ( "Value for metric %s has %d field values, yet the metric " "was defined to have %d fields." % ( metadata . metric_name , len ( field_values ) , len ( metadata . field_defs ) ) )
Checks that the given sequence of field values is valid.
Checks that the given sequence of field values is valid .
"""Checks that the given sequence of field values is valid.

  Args:
    field_values: A sequence of values for a particular metric's fields.
    metadata: MetricMetadata for the metric. The order of fields in the metadata
      should match the field values.

  Raises:
    ValueError: If the number of field values doesn't match the number
      of fields the metric has.
  """ # Field values are always arranged in the order in which the # the respective fields are defined in metadata.
If the number of field values doesn't match the number
of fields the metric has.
If the number of field values doesn ' t match the number of fields the metric has .
ValueError
field_values
A sequence of values for a particular metric's fields.
A sequence of values for a particular metric ' s fields .
metadata
MetricMetadata for the metric. The order of fields in the metadata
should match the field values.
MetricMetadata for the metric . The order of fields in the metadata should match the field values .