tools/metrics/actions/action_utils.py
def _GetAttribute(node, attribute_name, default_value):
  """Returns the attribute's value or default_value if attribute doesn't exist.

  Args:
    node: an XML dom element.
    attribute_name: name of the attribute.
    default_value: default value to return if attribute doesn't exist.

  Returns:
    The value of the attribute or default_value if attribute doesn't exist.
  """
  if node.hasAttribute(attribute_name):
    return node.getAttribute(attribute_name)
  else:
    return default_value
Returns the attribute's value or default_value if attribute doesn't exist.

  Args:
    node: an XML dom element.
    attribute_name: name of the attribute.
    default_value: default value to return if attribute doesn't exist.

  Returns:
    The value of the attribute or default_value if attribute doesn't exist.
  
Returns the attribute's value or default_value if attribute doesn't exist.
Returns the attribute ' s value or default_value if attribute doesn ' t exist .
def _GetAttribute(node, attribute_name, default_value):
  if node.hasAttribute(attribute_name):
    return node.getAttribute(attribute_name)
  else:
    return default_value
def _GetAttribute ( node , attribute_name , default_value ) : if node . hasAttribute ( attribute_name ) : return node . getAttribute ( attribute_name ) else : return default_value
Returns the attribute's value or default_value if attribute doesn't exist.
Returns the attribute ' s value or default_value if attribute doesn ' t exist .
"""Returns the attribute's value or default_value if attribute doesn't exist.

  Args:
    node: an XML dom element.
    attribute_name: name of the attribute.
    default_value: default value to return if attribute doesn't exist.

  Returns:
    The value of the attribute or default_value if attribute doesn't exist.
  """
The value of the attribute or default_value if attribute doesn't exist.
The value of the attribute or default_value if attribute doesn ' t exist .
node
an XML dom element.
an XML dom element .
attribute_name
name of the attribute.
name of the attribute .
default_value
default value to return if attribute doesn't exist.
default value to return if attribute doesn ' t exist .