mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixes color parameter mismatch and handles 204 responses correctly
This commit is contained in:
parent
03f0f4a8b3
commit
38114a65d8
2 changed files with 4 additions and 4 deletions
|
@ -176,8 +176,8 @@ def _query(function,
|
|||
if result.get('status', None) == salt.ext.six.moves.http_client.OK:
|
||||
response = hipchat_functions.get(api_version).get(function).get('response')
|
||||
return result.get('dict', {}).get(response, None)
|
||||
elif result.get('status', None) == salt.ext.six.moves.http_client.NO_CONTENT:
|
||||
return False
|
||||
elif result.get('status', None) == salt.ext.six.moves.http_client.NO_CONTENT and api_version == 'v2':
|
||||
return True
|
||||
else:
|
||||
log.debug(url)
|
||||
log.debug(query_params)
|
||||
|
|
|
@ -45,7 +45,7 @@ def send_message(name,
|
|||
api_url=None,
|
||||
api_key=None,
|
||||
api_version=None,
|
||||
message_color='yellow',
|
||||
color='yellow',
|
||||
notify=False):
|
||||
'''
|
||||
Send a message to a Hipchat room.
|
||||
|
@ -129,7 +129,7 @@ def send_message(name,
|
|||
api_url=api_url,
|
||||
api_key=api_key,
|
||||
api_version=api_version,
|
||||
color=message_color,
|
||||
color=color,
|
||||
notify=notify,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue