def scrub_sub_properties()

in tools/genconfig/genconfig.py [0:0]


def scrub_sub_properties(props):
  """Scrubs certain fields that may exist at any level in properties."""
  if isinstance(props, list):
    # May be list of objects, must go deeper.
    for p in props:
      scrub_sub_properties(p)

  if isinstance(props, dict):
    # Scrub properties on this set.
    props.pop('kind', None)
    props.pop('fingerprint', None)

    # Check any sub structures.
    for unused_k, p in props.iteritems():
      scrub_sub_properties(p)