From patchwork Thu Sep 8 22:14:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 3994 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E0AB823EF8 for ; Thu, 8 Sep 2011 22:14:15 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id CB61DA18418 for ; Thu, 8 Sep 2011 22:14:15 +0000 (UTC) Received: by fxd18 with SMTP id 18so2930863fxd.11 for ; Thu, 08 Sep 2011 15:14:15 -0700 (PDT) Received: by 10.223.4.133 with SMTP id 5mr606091far.81.1315520055563; Thu, 08 Sep 2011 15:14:15 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.11.8 with SMTP id m8cs192400lab; Thu, 8 Sep 2011 15:14:15 -0700 (PDT) Received: by 10.227.36.6 with SMTP id r6mr1273554wbd.99.1315520054532; Thu, 08 Sep 2011 15:14:14 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com [91.189.90.7]) by mx.google.com with ESMTPS id et19si4835593wbb.77.2011.09.08.15.14.14 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 08 Sep 2011 15:14:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1R1mrN-00084U-Qa for ; Thu, 08 Sep 2011 22:14:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id BB59FE06D6 for ; Thu, 8 Sep 2011 22:14:13 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 103 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 103: more mostly formatting changes to make reviewing the config branch easier Message-Id: <20110908221413.21668.30776.launchpad@ackee.canonical.com> Date: Thu, 08 Sep 2011 22:14:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13900"; Instance="initZopeless config overlay" X-Launchpad-Hash: d3c6caa9bab697d514092c2bd9be3dce382d402b ------------------------------------------------------------ revno: 103 committer: Michael-Doyle Hudson branch nick: trunk timestamp: Fri 2011-09-09 10:12:27 +1200 message: more mostly formatting changes to make reviewing the config branch easier modified: lava_dispatcher/__init__.py --- lp:lava-dispatcher https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk You are subscribed to branch lp:lava-dispatcher. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription === modified file 'lava_dispatcher/__init__.py' --- lava_dispatcher/__init__.py 2011-09-08 04:23:59 +0000 +++ lava_dispatcher/__init__.py 2011-09-08 22:12:27 +0000 @@ -67,29 +67,28 @@ try: status = 'fail' action.run(**params) - except CriticalError, err: - raise err - except (pexpect.TIMEOUT, GeneralError), err: + except CriticalError as err: + raise + except (pexpect.TIMEOUT, GeneralError) as err: pass - except Exception, err: + except Exception as err: raise else: status = 'pass' finally: if status == 'fail': - err_msg = "Lava failed at action " + cmd['command'] \ - + " with error: " + str(err) + "\n" + err_msg = "Lava failed at action %s with error: %s\n" %\ + (cmd['command'], err) if cmd['command'] == 'lava_test_run': - test_name = params.get('test_name', "Unknown") - err_msg = err_msg + "Lava failed with test: " \ - + test_name + err_msg += "Lava failed on test: %s" %\ + params.get('test_name', "Unknown") err_msg = err_msg + traceback.format_exc() # output to both serial log and logfile self.context.client.sio.write(err_msg) else: err_msg = "" - self.context.test_data.add_result(cmd['command'], - status, err_msg) + self.context.test_data.add_result( + cmd['command'], status, err_msg) except: #Capture all user-defined and non-user-defined critical errors self.context.test_data.job_status='fail'