summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/topological.py
diff options
context:
space:
mode:
authorJonathan Ellis <jbellis@gmail.com>2007-08-03 14:02:28 +0000
committerJonathan Ellis <jbellis@gmail.com>2007-08-03 14:02:28 +0000
commite4d849748c6cd6884da33cf0cf0cdaf8e319cf19 (patch)
tree342d65d26e0a0ebf7454979a28875f457f7ac151 /lib/sqlalchemy/topological.py
parentd7575a738d420a564e7a22f3347ab8f4442110bb (diff)
downloadsqlalchemy-e4d849748c6cd6884da33cf0cf0cdaf8e319cf19.tar.gz
only one instance of while len(...)
Diffstat (limited to 'lib/sqlalchemy/topological.py')
-rw-r--r--lib/sqlalchemy/topological.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/topological.py b/lib/sqlalchemy/topological.py
index dcfe9ea71..87efc802b 100644
--- a/lib/sqlalchemy/topological.py
+++ b/lib/sqlalchemy/topological.py
@@ -198,8 +198,8 @@ class QueueDependencySorter(object):
queue.append(n)
cycles = {}
output = []
- while len(nodes) > 0:
- if len(queue) == 0:
+ while nodes:
+ if not queue:
# edges remain but no edgeless nodes to remove; this indicates
# a cycle
if allow_all_cycles: