Commit 31974898 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

Compatible with networkx 1.11 => strongly_connected_components is a generator of sets (not lists)

parent 77edb9b6
......@@ -91,9 +91,8 @@ def add_start_nodes(filePath):
LOGGER.info("Before adding start nodes: " + staticanalyser.get_statistics())
# Lexicographic sort of nodes in each Strongly Connected Components
g = (scc for scc in sccs if len(scc) != 0)
g = (sorted(scc, key=str.lower) for scc in sccs if len(scc) != 0)
for scc in g:
scc.sort(key=str.lower)
# Mark the first node as a frontier
LOGGER.debug("SCC {}; first lexicographic node selected:{}".format(
scc, scc[0]))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment