Merge "Update "if .. if .." to "if .. in ..""

This commit is contained in:
Zuul 2021-06-10 08:23:52 +00:00 committed by Gerrit Code Review
commit 14401b9290
1 changed files with 3 additions and 5 deletions

View File

@ -440,15 +440,13 @@ class Job(object):
return
for job_action in self.job_doc.get('job_actions', []):
if job_action.get('mandatory', False) or\
if job_action.get('mandatory', False) or \
(result == Job.SUCCESS_RESULT):
action_result = self.execute_job_action(job_action)
if action_result == Job.FAIL_RESULT:
result = Job.FAIL_RESULT
if action_result in [Job.FAIL_RESULT, Job.ABORTED_RESULT]:
result = action_result
if action_result == Job.ABORTED_RESULT:
result = Job.ABORTED_RESULT
else:
freezer_action = job_action.get('freezer_action', {})
action_name = freezer_action.get('action', '')