Skip to content

Commit

Permalink
Refs #11054 Gracefully fail if dot unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Jeffery committed Feb 12, 2015
1 parent 36b10d8 commit 7623146
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/docs/runsphinx.py.in
Expand Up @@ -51,7 +51,7 @@ def main(sysarg):
if DIAGRAMS_DIR != "":
os.environ["DIAGRAMS_DIR"] = DIAGRAMS_DIR

if DOT_EXECUTABLE != "":
if os.path.isfile(DOT_EXECUTABLE):
os.environ["DOT_EXECUTABLE"] = DOT_EXECUTABLE

# Arguments for main
Expand Down
4 changes: 3 additions & 1 deletion Code/Mantid/docs/sphinxext/mantiddoc/directives/diagram.py
Expand Up @@ -61,7 +61,9 @@ def execute(self):
try:
dot_executable = os.environ["DOT_EXECUTABLE"]
except:
raise RuntimeError("The '.. diagram::' directive requires a DOT_EXECUTABLE environment variable to be set.")
self.add_rst(".. figure:: /images/ImageNotFound.png\n\n" +
" graphviz not found - diagram could not be rendered.")
return []

#Make sure we have an output directory
if not os.path.exists(out_dir):
Expand Down

0 comments on commit 7623146

Please sign in to comment.