(nodeid)
| 16 | |
| 17 | |
| 18 | def _to_nodeid(nodeid): |
| 19 | if isinstance(nodeid, int): |
| 20 | return ua.TwoByteNodeId(nodeid) |
| 21 | elif isinstance(nodeid, Node): |
| 22 | return nodeid.nodeid |
| 23 | elif isinstance(nodeid, ua.NodeId): |
| 24 | return nodeid |
| 25 | elif type(nodeid) in (str, bytes): |
| 26 | return ua.NodeId.from_string(nodeid) |
| 27 | else: |
| 28 | raise ua.UaError("Could not resolve '{0}' to a type id".format(nodeid)) |
| 29 | |
| 30 | |
| 31 | class Node(object): |
no test coverage detected