mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 10:11:17 +00:00
framework/output: handle missing/corrupt result files.
Do not explode if a result file for a job is missing when loading a RunOutput. Specify job status as "UNKNOWN" and add the exception from attempting to load the file to the events.
This commit is contained in:
parent
d616d30ee1
commit
c87d016025
@ -64,8 +64,14 @@ class Output(object):
|
|||||||
self.events = []
|
self.events = []
|
||||||
|
|
||||||
def reload(self):
|
def reload(self):
|
||||||
pod = read_pod(self.resultfile)
|
try:
|
||||||
self.result = Result.from_pod(pod)
|
pod = read_pod(self.resultfile)
|
||||||
|
self.result = Result.from_pod(pod)
|
||||||
|
except Exception as e:
|
||||||
|
self.result = Result()
|
||||||
|
self.result.status = Status.UNKNOWN
|
||||||
|
self.add_event(str(e))
|
||||||
|
|
||||||
|
|
||||||
def write_result(self):
|
def write_result(self):
|
||||||
write_pod(self.result.to_pod(), self.resultfile)
|
write_pod(self.result.to_pod(), self.resultfile)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user