diff --git a/lib/ansible/utils/color.py b/lib/ansible/utils/color.py index 81a05d749e1..35b60f489ba 100644 --- a/lib/ansible/utils/color.py +++ b/lib/ansible/utils/color.py @@ -78,10 +78,10 @@ def stringc(text, color): def colorize(lead, num, color): """ Print 'lead' = 'num' in 'color' """ + s = u"%s=%-4s" % (lead, str(num)) if num != 0 and ANSIBLE_COLOR and color is not None: - return u"%s%s%-15s" % (stringc(lead, color), stringc("=", color), stringc(str(num), color)) - else: - return u"%s=%-4s" % (lead, str(num)) + s = stringc(s, color) + return s def hostcolor(host, stats, color=True): if ANSIBLE_COLOR and color: