mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-03 11:52:36 +01:00
framework/instrumentation: handle non-job errors in ManagedCallback
If an error occurs in a ManagedCallback that is invoked outside of a job, re-raise rather than attempting to update the status of the non-existent job.
This commit is contained in:
@@ -275,7 +275,10 @@ class ManagedCallback(object):
|
|||||||
if isinstance(e, WorkloadError):
|
if isinstance(e, WorkloadError):
|
||||||
context.set_status('FAILED')
|
context.set_status('FAILED')
|
||||||
else:
|
else:
|
||||||
|
if context.current_job:
|
||||||
context.set_status('PARTIAL')
|
context.set_status('PARTIAL')
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
# Need this to keep track of callbacks, because the dispatcher only keeps
|
# Need this to keep track of callbacks, because the dispatcher only keeps
|
||||||
|
Reference in New Issue
Block a user