mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #6837 from s0undt3ch/develop
Don't fail if there's nothing to feed to `max()`.
This commit is contained in:
commit
7647993c9e
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user