提交 ada1a89a authored 作者: Frederic's avatar Frederic

Fix pydotprint_variables bug with pydot 1.0.28.

Older version of pydot, Edge was accepting the parameter label=''. Now this cause bug.
上级 4cc8c398
...@@ -949,7 +949,7 @@ def pydotprint_variables(vars, ...@@ -949,7 +949,7 @@ def pydotprint_variables(vars,
g.add_node(pd.Node(varastr, color='green')) g.add_node(pd.Node(varastr, color='green'))
else: else:
varastr = my_list[nd] varastr = my_list[nd]
label = '' label = None
if len(app.inputs) > 1: if len(app.inputs) > 1:
label = str(i) label = str(i)
g.add_edge(pd.Edge(varastr, astr, label=label)) g.add_edge(pd.Edge(varastr, astr, label=label))
...@@ -974,7 +974,7 @@ def pydotprint_variables(vars, ...@@ -974,7 +974,7 @@ def pydotprint_variables(vars,
g.add_node(pd.Node(varastr, color=color)) g.add_node(pd.Node(varastr, color=color))
else: else:
varastr = my_list[nd] varastr = my_list[nd]
label = '' label = None
if len(app.outputs) > 1: if len(app.outputs) > 1:
label = str(i) label = str(i)
g.add_edge(pd.Edge(astr, varastr, label=label)) g.add_edge(pd.Edge(astr, varastr, label=label))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论