MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / try_apply

Function try_apply

tests/tests_standard_address_space.py:23–30  ·  view source on GitHub ↗
(item, aliases)

Source from the content-addressed store, hash-verified

21 parent.remove(e)
22
23def try_apply(item, aliases):
24 attrib = item.attrib
25 for name in ('ReferenceType', 'DataType'):
26 try:
27 value = attrib[name]
28 attrib[name] = aliases[value]
29 except KeyError:
30 pass
31
32def read_nodes(path):
33 tree = ET.parse(path)

Callers 1

read_nodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected