X Tutup
Skip to content

Commit 825da34

Browse files
thomasgoirandkajinamit
authored andcommitted
Support networkx 3.x
Without this patch, there's 2 unit tests failing. Change-Id: I0b1e6585d2ff68a621c82930f9627801ff2766df (cherry picked from commit e3ad06e)
1 parent f1c8eeb commit 825da34

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vitrageclient/common/formatters.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ def emit_one(self, column_names, data, stdout, _=None):
3535
# so disable it (currently we don't have real multigraphs)
3636
self._reformat(data)
3737

38-
if nx.__version__ >= '2.0':
38+
if nx.__version__ >= '3.0':
39+
graph = json_graph.node_link_graph(
40+
data, name='graph_index')
41+
elif nx.__version__ >= '2.0':
3942
graph = json_graph.node_link_graph(
4043
data, attrs={'name': 'graph_index'})
4144
else:

0 commit comments

Comments
 (0)
X Tutup