Skip to content

Commit

Permalink
Re #10137. Fixing unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Aug 20, 2014
1 parent 5ec5756 commit 8992b5f
Showing 1 changed file with 15 additions and 15 deletions.
Expand Up @@ -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


Expand Down

0 comments on commit 8992b5f

Please sign in to comment.