Followup to bug 559898: fix cycle checker to allow self-loop special case.

This commit is contained in:
Chris Jones 2010-04-27 02:12:39 -05:00
parent 574b849ecd
commit a945d618e9

View File

@ -958,6 +958,10 @@ def checkcycles(p, stack=None):
stack = []
for cp in p.manages:
# special case for self-managed protocols
if cp is p:
continue
if cp in stack:
return [stack + [p, cp]]
cycles += checkcycles(cp, stack + [p])