diff options
author | Olly Cope <olly@ollycope.com> | 2021-05-16 17:37:15 +0000 |
---|---|---|
committer | Olly Cope <olly@ollycope.com> | 2021-05-16 17:37:15 +0000 |
commit | b7033720d65cce2bd29f17e96ab5f16bf4557955 (patch) | |
tree | 6e7f45eb62f810c5341df3b1b77c5ba4311b793c /yoyo | |
parent | 59f7e699a8d9b6d006521190d2006e7af5ed5640 (diff) | |
download | yoyo-b7033720d65cce2bd29f17e96ab5f16bf4557955.tar.gz |
topological sort: don't raise an error for non-existent dependencies
Diffstat (limited to 'yoyo')
-rw-r--r-- | yoyo/topologicalsort.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yoyo/topologicalsort.py b/yoyo/topologicalsort.py index 4cd1550..e74bf4a 100644 --- a/yoyo/topologicalsort.py +++ b/yoyo/topologicalsort.py @@ -41,7 +41,9 @@ def topological_sort( _, n = heappop(pqueue) - blockers = {d for d in dependency_graph.get(n, []) if d not in output} + blockers = { + d for d in dependency_graph.get(n, []) if d not in output and d in ordering + } if not blockers: seen_since_last_change = 0 output.add(n) |