Skip to content

Commit

Permalink
fixed faulty checkForOutputFailure
Browse files Browse the repository at this point in the history
  • Loading branch information
alfoa committed Sep 21, 2017
1 parent 3b919a5 commit bf2e128
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions framework/CodeInterfaces/RAVEN/RAVENInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,18 @@ def checkForOutputFailure(self,output,workingDir):
@ In, workingDir, string, current working dir
@ Out, failure, bool, True if the job is failed, False otherwise
"""
failure = True
failure = False
try:
outputToRead = open(os.path.join(workingDir,output),"r")
except:
return failure
readLines = outputToRead.readlines()
for badMessage in ["Traceback ","raise","IOError"]:
if not any(badMessage in x for x in readLines):
failure = False
del readLines
except IOError:
failure = True
if not failure:
readLines = outputToRead.readlines()
for badMessage in ["Traceback ","raise","IOError"]:
if any(badMessage in x for x in readLines):
failure = True
break
del readLines
return failure

def finalizeCodeOutput(self,command,output,workingDir):
Expand Down

1 comment on commit bf2e128

@joshua-cogliati-inl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, that fixes the problem. Thanks.

Please sign in to comment.