From patchwork Tue Jun 22 01:24:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Goldish X-Patchwork-Id: 107317 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5M1OQm6003022 for ; Tue, 22 Jun 2010 01:24:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758767Ab0FVBYY (ORCPT ); Mon, 21 Jun 2010 21:24:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57516 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752526Ab0FVBYX (ORCPT ); Mon, 21 Jun 2010 21:24:23 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5M1OMt9021789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 21 Jun 2010 21:24:22 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5M1OMsS006546; Mon, 21 Jun 2010 21:24:22 -0400 Received: from localhost.localdomain (dhcp-1-188.tlv.redhat.com [10.35.1.188]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o5M1OKWb030000; Mon, 21 Jun 2010 21:24:21 -0400 From: Michael Goldish To: autotest@test.kernel.org, kvm@vger.kernel.org Cc: Michael Goldish Subject: [KVM-AUTOTEST PATCH] KVM test: scan_results.py: fix handling of empty result list Date: Tue, 22 Jun 2010 04:24:13 +0300 Message-Id: <1277169855-14823-1-git-send-email-mgoldish@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 22 Jun 2010 01:24:41 +0000 (UTC) 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)