Skip to content

Commit

Permalink
Mathadon issue296 error reporting (#299)
Browse files Browse the repository at this point in the history
* improved error reporting

* avoiding duplicate output

* fruther clarified error
  • Loading branch information
mwetter authored Oct 15, 2019
1 parent 10ea43c commit 6a1dec9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions buildingspy/development/regressiontest.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ def runSimulation(worDir, cmd):
try:
retcode = pro.wait()
if retcode != 0:
print("*** Execution of command '{}' failed".format(cmd))
print("*** Working directory is {}".format(worDir))
print("*** Command is {}\n".format(cmd))
print("*** Files in directory {} are\n".format(worDir))
for fil in os.listdir(worDir):
print(" {}".format(fil))
print("*** stdout.log is \n")
print("*** The command returned the following output: \n")
if os.path.isfile(logFilNam):
with open(logFilNam, 'r') as f:
print(f.read())
else:
print("The file {} does not exist.\n".format(logFilNam))
print("*** end of stdout.log\n")
print("*** end of command output\n")

print("Child was terminated by signal {}".format(retcode))
return retcode
Expand Down

0 comments on commit 6a1dec9

Please sign in to comment.