From 720ee3792dc45f514d82108f217bb99e538ef98b Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Thu, 24 Mar 2016 17:45:38 +0000 Subject: [PATCH] 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] https://github.com/networkx/networkx/commit/f5031dd9c6c1f4b63082c192e1887ea044109aaa Change-Id: I99f87af0b2bed959fcb43ef611b3186e23bd9549 Closes-Bug: #1561656 --- taskflow/types/graph.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/taskflow/types/graph.py b/taskflow/types/graph.py index 349dc09c..4bd1e605 100644 --- a/taskflow/types/graph.py +++ b/taskflow/types/graph.py @@ -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."""