If there are no test results, max() tries to operate on an empty sequence and throws an exception. Signed-off-by: Michael Goldish <mgoldish@xxxxxxxxxx> --- client/tests/kvm/scan_results.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm/scan_results.py b/client/tests/kvm/scan_results.py index f7073e4..a339a85 100755 --- a/client/tests/kvm/scan_results.py +++ b/client/tests/kvm/scan_results.py @@ -74,7 +74,7 @@ def main(resfiles): continue results = parse_results(text) result_lists.append((resfile, results)) - name_width = max(name_width, max(len(r[0]) for r in results)) + name_width = max([name_width] + [len(r[0]) for r in results]) print_result(("Test", "Status", "Seconds", "Info"), name_width) print_result(("----", "------", "-------", "----"), name_width) -- 1.5.4.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html