MCPcopy Create free account
hub / github.com/Kitware/CMake / __get_attribute

Function __get_attribute

Source/cmConvertMSBuildXMLToJSON.py:408–416  ·  view source on GitHub ↗

Retrieves the attribute of the given name from the node. If not present then the default_value is used.

(node, name, default_value='')

Source from the content-addressed store, hash-verified

406
407
408def __get_attribute(node, name, default_value=''):
409 """Retrieves the attribute of the given name from the node.
410
411 If not present then the default_value is used.
412 """
413 if node.hasAttribute(name):
414 return node.attributes[name].value.strip()
415 else:
416 return default_value
417
418
419###########################################################################################

Callers 5

__convert_enumFunction · 0.85
__convert_boolFunction · 0.85
__convert_string_listFunction · 0.85
__convert_nodeFunction · 0.85
__preprocess_argumentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…