Commit 5740cb3e authored by Yuanpeng Zhang's avatar Yuanpeng Zhang Committed by Peterson, Peter
Browse files

deal with environment being empty

parent ec3e8984
......@@ -166,18 +166,17 @@ class SetSampleFromLogs(DistributedDataProcessorAlgorithm):
environment = self._createEnvironment(runObject, instrEnum)
# let SetSample generate errors if anything is wrong
try:
if self.getProperty("Environment").value.values():
SetSample(InputWorkspace=wksp,
Material=material,
Geometry=geometry)
else:
SetSample(InputWorkspace=wksp,
Material=material,
Geometry=geometry,
Environment=environment,
ContainerGeometry=geometryContainer,
ContainerMaterial=materialContainer)
except Exception as inst:
self.log().warning(inst.args[0])
SetSample(InputWorkspace=wksp,
Material=material,
Geometry=geometry)
# Register algorithm with Mantid.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment