mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #43882 from kunal-bajpai/fix_couchbase_returner
Handle possible KeyError in couchbase.get_load
This commit is contained in:
commit
820a542a8d
@ -265,9 +265,12 @@ def get_load(jid):
|
||||
except couchbase.exceptions.NotFoundError:
|
||||
return {}
|
||||
|
||||
ret = jid_doc.value['load']
|
||||
if 'minions' in jid_doc.value:
|
||||
ret = {}
|
||||
try:
|
||||
ret = jid_doc.value['load']
|
||||
ret['Minions'] = jid_doc.value['minions']
|
||||
except KeyError as e:
|
||||
log.error(e)
|
||||
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user