Skip to content

Commit

Permalink
Fix reducer modifications
Browse files Browse the repository at this point in the history
Refs #7469
  • Loading branch information
martyngigg committed Jul 22, 2013
1 parent 9969e5b commit c250240
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Code/Mantid/scripts/reduction/reducer.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def execute(self, reducer, inputworkspace=None, outputworkspace=None):
if not isinstance(alg, mantid.api.AlgorithmProxy):
raise RuntimeError, "Reducer expects a ReductionStep or a function returning an AlgorithmProxy object"

propertyOrder = proxy.orderedProperties()
propertyOrder = alg.orderedProperties()

# add the args to the kw list so everything can be set in a single way
for (key, arg) in zip(propertyOrder[:len(args)], args):
Expand All @@ -105,7 +105,7 @@ def execute(self, reducer, inputworkspace=None, outputworkspace=None):
simpleapi._set_properties(alg, [], **kwargs)
alg.execute()
if "OutputMessage" in propertyOrder:
return proxy.getPropertyValue("OutputMessage")
return alg.getPropertyValue("OutputMessage")
return "%s applied" % alg.name()
return f(reducer, _AlgorithmStep())

Expand Down Expand Up @@ -221,7 +221,7 @@ def execute(self, reducer, inputworkspace=None, outputworkspace=None):
if outputworkspace is None:
outputworkspace = inputworkspace
alg = mantid.FrameworkManager.createAlgorithm(algorithm)
if not isinstance(proxy, mantid.api.AlgorithmProxy):
if not isinstance(alg, mantid.api.AlgorithmProxy):
raise RuntimeError, "Reducer expects a ReductionStep or a function returning an IAlgorithmProxy object"

propertyOrder = alg.orderedProperties()
Expand Down

0 comments on commit c250240

Please sign in to comment.