Merge pull request #6837 from s0undt3ch/develop

Don't fail if there's nothing to feed to `max()`.
This commit is contained in:
Joseph Hall 2013-08-21 13:49:44 -07:00
commit 7647993c9e

View File

@ -146,8 +146,8 @@ def output(data):
# Append result counts to end of output
colorfmt = '{0}{1}{2[ENDC]}'
rlabel = {True: 'Succeeded', False: 'Failed', None: 'Not Run'}
count_max_len = max([len(str(x)) for x in rcounts.values()])
label_max_len = max([len(x) for x in rlabel.values()])
count_max_len = max([len(str(x)) for x in rcounts.values()] or [0])
label_max_len = max([len(x) for x in rlabel.values()] or [0])
line_max_len = label_max_len + count_max_len + 2 # +2 for ': '
hstrs.append(
colorfmt.format(