wf: don't crash if graphviz is not installed
This commit is contained in:
parent
46f142df1e
commit
4d01005c77
|
@ -134,8 +134,11 @@ def graphviz(workflow, url_prefix='', select=None, svg=True,
|
|||
print >>out, '}'
|
||||
out = out.getvalue()
|
||||
if svg:
|
||||
process = Popen(['dot', '-Tsvg', '/dev/stdin'], stdin=PIPE, stdout=PIPE)
|
||||
out, err = process.communicate(out)
|
||||
try:
|
||||
process = Popen(['dot', '-Tsvg', '/dev/stdin'], stdin=PIPE, stdout=PIPE)
|
||||
out, err = process.communicate(out)
|
||||
except OSError:
|
||||
return ''
|
||||
if include:
|
||||
out = graphviz_post_treatment(out)
|
||||
# It seems webkit refuse to accept SVG when using its proper namespace,
|
||||
|
|
Loading…
Reference in New Issue