소스 검색

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.
Vadim Rutkovsky 7 년 전
부모
커밋
6d15313473
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      roles/openshift_health_checker/callback_plugins/zz_failure_summary.py

+ 2 - 0
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),