From 6d15313473e273a368f002972bdb5960dc5f1c78 Mon Sep 17 00:00:00 2001 From: Vadim Rutkovsky Date: Thu, 4 Jan 2018 15:18:02 +0100 Subject: 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: object has no attribute 'split'" error. --- roles/openshift_health_checker/callback_plugins/zz_failure_summary.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'roles') 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), -- cgit v1.2.3