summaryrefslogtreecommitdiff
path: root/graph.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2010-09-24 14:44:16 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2010-09-24 14:44:16 +0200
commit2c6b07b2740b1d23617aa103e108e016766b6186 (patch)
tree1869c280aa98b60ce9c02594738c766a1da53f0b /graph.py
parentb8d45493069b9374d7b354189abd63f96c49a966 (diff)
downloadlogilab-common-2c6b07b2740b1d23617aa103e108e016766b6186.tar.gz
py2.3 compat : import compat.set, remove deprecated stuff
Diffstat (limited to 'graph.py')
-rw-r--r--graph.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/graph.py b/graph.py
index efa2380..8c02016 100644
--- a/graph.py
+++ b/graph.py
@@ -28,6 +28,7 @@ import os.path as osp
import os
import sys
import tempfile
+from logilab.common.compat import sorted, reversed
def escape(value):
"""Make <value> usable in a dot file."""
@@ -183,7 +184,7 @@ def ordered_nodes(graph):
"""
cycles = get_cycles(graph)
if cycles:
- cycles = '\n'.join(' -> '.join(cycle) for cycle in cycles)
+ cycles = '\n'.join([' -> '.join(cycle) for cycle in cycles])
raise UnorderableGraph(cycles)
ordered = []
while graph: