diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-02-22 14:00:20 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-02-22 14:00:36 +0000 |
commit | 07e11f8dcdbe500cf25c162ef774566a1a4f82e6 (patch) | |
tree | d01de6c754f97a04105319208b405717d493dbb6 /morphlib | |
parent | f3aa715cf5e9ba09c44f2c1aa2c99ecd51d2a168 (diff) | |
download | morph-07e11f8dcdbe500cf25c162ef774566a1a4f82e6.tar.gz |
Avoid infinite looping when walking artifact dep graph
Reported-By: Sam Thursfield
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/artifact.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/morphlib/artifact.py b/morphlib/artifact.py index 3bb2a520..aef48d76 100644 --- a/morphlib/artifact.py +++ b/morphlib/artifact.py @@ -75,11 +75,11 @@ class Artifact(object): done = set() def depth_first(a): - for dep in a.dependencies: - for ret in depth_first(dep): - yield ret if a not in done: done.add(a) + for dep in a.dependencies: + for ret in depth_first(dep): + yield ret yield a return list(depth_first(self)) |