зеркало из https://github.com/mozilla/pjs.git
Followup to bug 559898: fix cycle checker to allow self-loop special case.
This commit is contained in:
Родитель
8e654f06b0
Коммит
7ec95f927b
|
@ -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])
|
||||
|
|
Загрузка…
Ссылка в новой задаче