diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-11-04 06:11:21 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-11-04 06:11:21 +0000 |
commit | ef48ddc5030548298ce4b12c645dd01c860362d3 (patch) | |
tree | 698e3f919778246590f90f3f6e331cc6963430da /lib/sqlalchemy/topological.py | |
parent | 03068225263255a5f74ff97ad3d5d287d1b233da (diff) | |
download | sqlalchemy-ef48ddc5030548298ce4b12c645dd01c860362d3.tar.gz |
- fix to subtle condition in topological sort where a node could appear twice,
for [ticket:362]
Diffstat (limited to 'lib/sqlalchemy/topological.py')
-rw-r--r-- | lib/sqlalchemy/topological.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/topological.py b/lib/sqlalchemy/topological.py index 2a9d027e7..9a7f2dd19 100644 --- a/lib/sqlalchemy/topological.py +++ b/lib/sqlalchemy/topological.py @@ -133,8 +133,9 @@ class QueueDependencySorter(object): lead.cycles.add(edge[1]) if n is not None: queue.append(n) - if n is not lead: - n._cyclical = True + for n in lead.cycles: + if n is not lead: + n._cyclical = True # loop through cycle # remove edges from the edge dictionary # install the cycled nodes in the "cycle" list of one of the nodes |