From 8992b5f2175cb2f79fad0b5928c3cc3b4a4de833 Mon Sep 17 00:00:00 2001 From: Pete Peterson Date: Wed, 20 Aug 2014 17:27:21 -0400 Subject: [PATCH] Re #10137. Fixing unit test. --- .../plugins/algorithms/CheckForSampleLogs.py | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Code/Mantid/Framework/PythonInterface/plugins/algorithms/CheckForSampleLogs.py b/Code/Mantid/Framework/PythonInterface/plugins/algorithms/CheckForSampleLogs.py index 9240f3fda25d..ff4ff2a92155 100644 --- a/Code/Mantid/Framework/PythonInterface/plugins/algorithms/CheckForSampleLogs.py +++ b/Code/Mantid/Framework/PythonInterface/plugins/algorithms/CheckForSampleLogs.py @@ -22,28 +22,28 @@ def summary(self): def PyInit(self): """ Declare properties """ - self.declareProperty(WorkspaceProperty("Workspace", "",Direction.Input), "The workspace to check.") - self.declareProperty("LogNames","","Names of the logs to look for") - self.declareProperty("Result","A string that will be empty if all the logs are found, otherwise will contain an error message",Direction.Output) + self.declareProperty(WorkspaceProperty("Workspace", "",Direction.Input), "The workspace to check.") + self.declareProperty("LogNames","","Names of the logs to look for") + self.declareProperty("Result","A string that will be empty if all the logs are found, otherwise will contain an error message",Direction.Output) return def PyExec(self): """ Main execution body """ - #get parameters - w = self.getProperty("Workspace").value - logNames = self.getProperty("LogNames").value - resultString='' - #check for parameters and build the result string - for value in logNames.split(','): - value=value.strip() - if len(value)>0: + #get parameters + w = self.getProperty("Workspace").value + logNames = self.getProperty("LogNames").value + resultString='' + #check for parameters and build the result string + for value in logNames.split(','): + value=value.strip() + if len(value)>0: if not w.run().hasProperty(value): - resultString+='Property '+value+' not found\n' + resultString+='Property '+value+' not found\n' - #return the result - logger.notice(resultString) - self.setProperty("Result",resultString) + #return the result + logger.notice(resultString) + self.setProperty("Result",resultString) return