1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 02:01:16 +00: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:
Sergei Trofimov 2017-09-27 10:15:31 +01:00
parent 7cdb32c7f8
commit 9d7f998511

View File

@ -275,7 +275,10 @@ class ManagedCallback(object):
if isinstance(e, WorkloadError):
context.set_status('FAILED')
else:
context.set_status('PARTIAL')
if context.current_job:
context.set_status('PARTIAL')
else:
raise
# Need this to keep track of callbacks, because the dispatcher only keeps