Support networkx 3.x
Without this patch, there's 2 unit tests failing. Change-Id: I0b1e6585d2ff68a621c82930f9627801ff2766df (cherry picked from commite3ad06efb6
) (cherry picked from commit825da34435
)
This commit is contained in:

committed by
Takashi Kajinami

parent
8a8defca72
commit
d5ab44e761
@@ -35,7 +35,10 @@ class GraphFormatter(base.SingleFormatter, metaclass=abc.ABCMeta):
|
||||
# so disable it (currently we don't have real multigraphs)
|
||||
self._reformat(data)
|
||||
|
||||
if nx.__version__ >= '2.0':
|
||||
if nx.__version__ >= '3.0':
|
||||
graph = json_graph.node_link_graph(
|
||||
data, name='graph_index')
|
||||
elif nx.__version__ >= '2.0':
|
||||
graph = json_graph.node_link_graph(
|
||||
data, attrs={'name': 'graph_index'})
|
||||
else:
|
||||
|
Reference in New Issue
Block a user