(self, lst)
| 254 | return cur |
| 255 | |
| 256 | def make_node(self, lst): |
| 257 | if isinstance(lst, str): |
| 258 | lst = [x for x in Utils.split_path(lst) if x and x != '.'] |
| 259 | cur = self |
| 260 | for x in lst: |
| 261 | if x == '..': |
| 262 | cur = cur.parent or cur |
| 263 | continue |
| 264 | try: |
| 265 | cur = cur.children[x] |
| 266 | except AttributeError: |
| 267 | cur.children = self.dict_class() |
| 268 | except KeyError: |
| 269 | pass |
| 270 | else: |
| 271 | continue |
| 272 | cur = self.__class__(x, cur) |
| 273 | return cur |
| 274 | |
| 275 | def search_node(self, lst): |
| 276 | if isinstance(lst, str): |
no outgoing calls