(props)
Scrubs certain fields that may exist at any level in properties.
Scrubs certain fields that may exist at any level in properties.
Scrubs certain fields that may exist at any level in properties .
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)
def scrub_sub_properties ( props ) : 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 )