Skip to content
Snippets Groups Projects
Commit db26bfe1 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony
Browse files

Protect screenshot capture if the GUI is not present.

Refs #9521
parent ca642c60
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,10 @@ def algorithm_screenshot(name, directory, version = -1, ext = ".png"):
Returns:
str: A full path to the image file
"""
import mantid
if not mantid.__gui__:
return "NoGUI-ImageNotGenerated.png"
import mantidqtpython as mantidqt
from mantidplot import screenshot_to_dir, threadsafe_call
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment