Skip to content

Commit e5773c4

Browse files
committed
draw_graph() method is executed with try-except.
1 parent d3524cb commit e5773c4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

examples/dataflow_example/dataflow_example.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ def mkMultAdd():
4747
df.make_always()
4848

4949
# draw dataflow graph in png
50-
df.draw_graph()
50+
try:
51+
df.draw_graph()
52+
except:
53+
print('Dataflow graph could not be generated.')
5154

5255
return m
5356

tests/lib_dataflow_/draw_graph/lib_dataflow_draw_graph.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ def mkLed():
3232

3333
df.make_always()
3434

35-
df.draw_graph('out.png')
35+
try:
36+
df.draw_graph()
37+
except:
38+
print('Dataflow graph could not be generated.')
3639

3740
return m
3841

0 commit comments

Comments
 (0)