admin: skip workflow graph if graphviz fails (#11494)

This commit is contained in:
Frédéric Péters 2016-06-23 11:59:55 +02:00
parent 071bd24885
commit c1a46ac67d
1 changed files with 2 additions and 0 deletions

View File

@ -177,6 +177,8 @@ def graphviz(workflow, url_prefix='', select=None, svg=True,
try:
process = Popen(['dot', '-Tsvg'], stdin=PIPE, stdout=PIPE)
out, err = process.communicate(out)
if process.returncode != 0:
return ''
except OSError:
return ''
out = graphviz_post_treatment(out, revert_colours)