## Initialize for a depth-first walk of the inheritance graph.
seen = {}
- visited = {}
+ visiting = { me.name: True }
stack = [me]
## Visit nodes, collecting their keys. Don't believe the values:
## resolving inheritance is too hard to do like this.
while stack:
sec = stack.pop()
- if sec.name in visited: continue
- visited[sec.name] = True
- stack += sec._parents()
+ for p in sec._parents():
+ if p.name not in visiting:
+ stack.append(p); visiting[p.name] = True
for key in sec._itemmap.iterkeys():
if key != '@inherit': seen[key] = None