diff options
author | Dag Wieers <dag@wieers.com> | 2018-02-19 13:50:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-19 13:50:16 +0100 |
commit | d988c269ab044a424f74b24e55f2c86cbf21aa8c (patch) | |
tree | 5dc84d0922d4f4bd70d0c92558b7fc4ba7014a32 | |
parent | 32dc936c20600cc37cdef8e0fcc90b4adb7fc205 (diff) | |
download | ansible-mail-plugin-str-int.tar.gz |
mail: Fix cannot concatenate 'str' and 'int' objectsmail-plugin-str-int
Fix an error in callback plugin when exceptions are being returned on failure.
-rw-r--r-- | lib/ansible/plugins/callback/mail.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/plugins/callback/mail.py b/lib/ansible/plugins/callback/mail.py index 3fe75be479..251a45d6d6 100644 --- a/lib/ansible/plugins/callback/mail.py +++ b/lib/ansible/plugins/callback/mail.py @@ -199,10 +199,10 @@ class CallbackModule(CallbackBase): body += self.body_blob(result._result['stderr'], 'error output') if result._result.get('warnings'): for i in range(len(result._result.get('warnings'))): - body += self.body_blob(result._result['warnings'][i], 'exception %d' % i + 1) + body += self.body_blob(result._result['warnings'][i], 'exception %d' % (i + 1)) if result._result.get('deprecations'): for i in range(len(result._result.get('deprecations'))): - body += self.body_blob(result._result['deprecations'][i], 'exception %d' % i + 1) + body += self.body_blob(result._result['deprecations'][i], 'exception %d' % (i + 1)) body += 'and a complete dump of the error:\n\n' body += self.indent('%s: %s' % (failtype, json.dumps(result._result, indent=4))) |