Commit b1626c77 authored by Yuanpeng Zhang's avatar Yuanpeng Zhang
Browse files

deal with environment being empty

parent 5c1b6497
......@@ -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