mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixed a bug in the consul.py module that was preventing services (#34051)
from registering in consul.agent_service_register. A nonexistent dict key was being referenced, causing an Excpetion and failure to register the service. This fix required only changing the offending line to use the "get" method and supplying a default value.
This commit is contained in:
parent
8ba117c7f6
commit
bca437128e
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ def _query(function,
|
|||
)
|
||||
|
||||
if result.get('status', None) == salt.ext.six.moves.http_client.OK:
|
||||
ret['data'] = result['dict']
|
||||
ret['data'] = result.get('dict', result)
|
||||
ret['res'] = True
|
||||
elif result.get('status', None) == salt.ext.six.moves.http_client.NO_CONTENT:
|
||||
ret['res'] = False
|
||||
|
|
Loading…
Add table
Reference in a new issue