Skip to content
Snippets Groups Projects
Unverified Commit 3eb78897 authored by Pete Peterson's avatar Pete Peterson Committed by GitHub
Browse files

Merge pull request #22978 from samueljackson92/22974-fix-maud-warning-on-start

Fix MAUD warning on Mantid start
parents 4e5e9cac 6b4ff1a8
No related branches found
No related tags found
No related merge requests found
......@@ -85,7 +85,12 @@ class SaveGEMMAUDParamFile(PythonAlgorithm):
def create_empty_param_list(default_value="0"):
return "\n".join(default_value for _ in range(num_banks))
with open(self.getProperty(self.PROP_TEMPLATE_FILE).value) as template_file:
template_file_path = self.getProperty(self.PROP_TEMPLATE_FILE).value
if len(template_file_path) == 0:
logger.error("Could not find default diffraction directory for .maud template file: "
"you'll have to find it yourself")
with open(template_file_path) as template_file:
template = template_file.read()
output_params["function_types"] = create_empty_param_list("1")
......@@ -136,8 +141,6 @@ class SaveGEMMAUDParamFile(PythonAlgorithm):
if os.path.exists(path_to_test):
return path_to_test
logger.warning("Could not find default diffraction directory for .maud template file: "
"you'll have to find it yourself")
return ""
def _format_param_list(self, param_list):
......
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