Python 2.6 str.format() compatibility fixes.

This commit is contained in:
Matt Clay 2018-01-10 12:03:25 -08:00
parent 95ff8f1a90
commit 797664d9cb
20 changed files with 43 additions and 62 deletions

View file

@ -141,7 +141,7 @@ class CallbackModule(CallbackBase):
response = open_url(url, data=data, headers=headers, method='POST')
return response.read()
except Exception as ex:
self._display.warning('Could not submit message to hipchat: {}'.format(ex))
self._display.warning('Could not submit message to hipchat: {0}'.format(ex))
def send_msg_v1(self, msg, msg_format='text', color='yellow', notify=False):
"""Method for sending a message to HipChat"""
@ -159,7 +159,7 @@ class CallbackModule(CallbackBase):
response = open_url(url, data=urlencode(params))
return response.read()
except Exception as ex:
self._display.warning('Could not submit message to hipchat: {}'.format(ex))
self._display.warning('Could not submit message to hipchat: {0}'.format(ex))
def v2_playbook_on_play_start(self, play):
"""Display Playbook and play start messages"""