Fix export_to_dot for networkx package changes
The networkx package changed the way they to_pydot works [1].
This patch updates TaskFlow to work with the newer version.
[1] f5031dd9c6
Change-Id: I99f87af0b2bed959fcb43ef611b3186e23bd9549
Closes-Bug: #1561656
This commit is contained in:
@@ -18,6 +18,7 @@ import collections
|
||||
import os
|
||||
|
||||
import networkx as nx
|
||||
from networkx.drawing import nx_pydot
|
||||
import six
|
||||
|
||||
|
||||
@@ -57,7 +58,7 @@ class Graph(nx.Graph):
|
||||
|
||||
def export_to_dot(self):
|
||||
"""Exports the graph to a dot format (requires pydot library)."""
|
||||
return nx.to_pydot(self).to_string()
|
||||
return nx_pydot.to_pydot(self).to_string()
|
||||
|
||||
def pformat(self):
|
||||
"""Pretty formats your graph into a string."""
|
||||
|
||||
Reference in New Issue
Block a user