mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Prevents crash when there is no job entry
Seems like in rare race conditions it might happen that there is no job entry. This prevents Salt from crashing at that point.
This commit is contained in:
parent
fdb13a3a91
commit
d263410e46
1 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,9 @@ def _walk_through(job_dir):
|
|||
except Exception:
|
||||
log.exception('Failed to deserialize %s', load_path)
|
||||
continue
|
||||
if not job:
|
||||
log.error('Deserialization of job succeded but there is no data in %s', load_path)
|
||||
continue
|
||||
jid = job['jid']
|
||||
yield jid, job, t_path, final
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue