(*args)
| 7 | |
| 8 | |
| 9 | def _parse_nodeid_qname(*args): |
| 10 | try: |
| 11 | if isinstance(args[0], int): |
| 12 | nodeid = ua.NodeId(0, int(args[0])) |
| 13 | qname = ua.QualifiedName(args[1], int(args[0])) |
| 14 | return nodeid, qname |
| 15 | if isinstance(args[0], ua.NodeId): |
| 16 | nodeid = args[0] |
| 17 | elif isinstance(args[0], str): |
| 18 | nodeid = ua.NodeId.from_string(args[0]) |
| 19 | else: |
| 20 | raise RuntimeError() |
| 21 | if isinstance(args[1], ua.QualifiedName): |
| 22 | qname = args[1] |
| 23 | elif isinstance(args[1], str): |
| 24 | qname = ua.QualifiedName.from_string(args[1]) |
| 25 | else: |
| 26 | raise RuntimeError() |
| 27 | return nodeid, qname |
| 28 | except ua.UaError: |
| 29 | raise |
| 30 | except Exception as ex: |
| 31 | raise TypeError("This method takes either a namespace index and a string as argument or a nodeid and a qualifiedname. Received arguments {0} and got exception {1}".format(args, ex)) |
| 32 | |
| 33 | |
| 34 | def create_folder(parent, nodeid, bname): |
no test coverage detected