summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorVadim Rutkovsky <vrutkovs@redhat.com>2018-01-04 15:18:02 +0100
committerVadim Rutkovsky <vrutkovs@redhat.com>2018-01-04 15:18:02 +0100
commit6d15313473e273a368f002972bdb5960dc5f1c78 (patch)
tree01b1db26a45fad73f05819b71fa3889b54d33633 /roles
parent9f19afc7529bd7293433b27e834b9ee3479e646f (diff)
downloadopenshift-6d15313473e273a368f002972bdb5960dc5f1c78.tar.gz
openshift-6d15313473e273a368f002972bdb5960dc5f1c78.tar.bz2
openshift-6d15313473e273a368f002972bdb5960dc5f1c78.tar.xz
openshift-6d15313473e273a368f002972bdb5960dc5f1c78.zip
failure_summary: make sure msg is always a string
Some tasks may return a dict in the msg. In that case `stringc` will fail to colorize it (with "AttributeError: <msg type> object has no attribute 'split'" error.
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_health_checker/callback_plugins/zz_failure_summary.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/roles/openshift_health_checker/callback_plugins/zz_failure_summary.py b/roles/openshift_health_checker/callback_plugins/zz_failure_summary.py
index dcaf87eca..c83adb26d 100644
--- a/roles/openshift_health_checker/callback_plugins/zz_failure_summary.py
+++ b/roles/openshift_health_checker/callback_plugins/zz_failure_summary.py
@@ -175,6 +175,8 @@ def format_failure(failure):
play = failure['play']
task = failure['task']
msg = failure['msg']
+ if not isinstance(msg, string_types):
+ msg = str(msg)
checks = failure['checks']
fields = (
(u'Hosts', host),