From 2c6b07b2740b1d23617aa103e108e016766b6186 Mon Sep 17 00:00:00 2001 From: Sylvain Th?nault Date: Fri, 24 Sep 2010 14:44:16 +0200 Subject: py2.3 compat : import compat.set, remove deprecated stuff --- graph.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'graph.py') 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 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: -- cgit v1.2.1