summaryrefslogtreecommitdiff
path: root/morphlib/artifact.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-02-22 14:00:20 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-02-22 14:00:36 +0000
commit07e11f8dcdbe500cf25c162ef774566a1a4f82e6 (patch)
treed01de6c754f97a04105319208b405717d493dbb6 /morphlib/artifact.py
parentf3aa715cf5e9ba09c44f2c1aa2c99ecd51d2a168 (diff)
downloadmorph-07e11f8dcdbe500cf25c162ef774566a1a4f82e6.tar.gz
Avoid infinite looping when walking artifact dep graph
Reported-By: Sam Thursfield
Diffstat (limited to 'morphlib/artifact.py')
-rw-r--r--morphlib/artifact.py6
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))