mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +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
1 changed files with 5 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue