summaryrefslogtreecommitdiff
path: root/graph.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-10-18 11:53:07 +0200
committerEmile Anclin <emile.anclin@logilab.fr>2010-10-18 11:53:07 +0200
commit5553a7c1150ceac2f17d781cb09fdf475d7d7f91 (patch)
treeda536427753ddfe915647b891531b05e1665e462 /graph.py
parent0ea75902f065515d2dc49d18a642958a62876cc7 (diff)
downloadlogilab-common-5553a7c1150ceac2f17d781cb09fdf475d7d7f91.tar.gz
py3.x compat: pass a key to sorted
Diffstat (limited to 'graph.py')
-rw-r--r--graph.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/graph.py b/graph.py
index 8c02016..f3436ff 100644
--- a/graph.py
+++ b/graph.py
@@ -189,7 +189,7 @@ def ordered_nodes(graph):
ordered = []
while graph:
# sorted to get predictable results
- for node, deps in sorted(graph.items()):
+ for node, deps in sorted(graph.items(), key=id):
if not deps:
ordered.append(node)
del graph[node]