diff options
author | Jonathan Ellis <jbellis@gmail.com> | 2007-08-03 14:02:28 +0000 |
---|---|---|
committer | Jonathan Ellis <jbellis@gmail.com> | 2007-08-03 14:02:28 +0000 |
commit | e4d849748c6cd6884da33cf0cf0cdaf8e319cf19 (patch) | |
tree | 342d65d26e0a0ebf7454979a28875f457f7ac151 /lib/sqlalchemy/topological.py | |
parent | d7575a738d420a564e7a22f3347ab8f4442110bb (diff) | |
download | sqlalchemy-e4d849748c6cd6884da33cf0cf0cdaf8e319cf19.tar.gz |
only one instance of while len(...)
Diffstat (limited to 'lib/sqlalchemy/topological.py')
-rw-r--r-- | lib/sqlalchemy/topological.py | 4 |
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: |