Navigate the node to determine dependencies. Circular references raise an
exception.
Shamelessly stolen algorithm from:
http://www.electricmonk.nl/log/2008/08/07/dependency-resolving-algorithm/
Definition at line 17 of file virtual_mixin.py.
19 Navigate the node to determine dependencies. Circular references raise an
22 Shamelessly stolen algorithm from:
23 http://www.electricmonk.nl/log/2008/08/07/dependency-resolving-algorithm/
25 if resolved
is None: resolved = []
26 if unresolved
is None: unresolved = []
27 unresolved.append(node)
28 for dependency
in node.dependencies:
29 if dependency
not in resolved:
30 if dependency
in unresolved:
31 raise Exception(
'Circular reference detected: %s -> %s'
32 % (node.name, dependency.name))
36 unresolved.remove(node)