From patchwork Thu Sep 5 23:08:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Baker X-Patchwork-Id: 19795 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 636DA24692 for ; Thu, 5 Sep 2013 23:08:29 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id i13sf266359qae.7 for ; Thu, 05 Sep 2013 16:08:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:to:from:subject :message-id:date:reply-to:sender:errors-to:precedence :x-original-sender:x-original-authentication-results:mailing-list :list-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=Qqdkn2FJ7vlDPqYQ5oYaVp5TnI8l1C93silwE8C8hdk=; b=QnAqFNg77Nf4xRTKk4Z9CS4I090JjBVA970bpnUkWFwir0qDsvnWmyfAeOpANHTySC 8pvsxcdr/qvwtJ618jfQkSmqCYqVxNizOiUHtfAS67Bt21o9CYABgMHf0WC/BqxCz1lG ITZqvvf35uEXXjh2MqkDFvJOSfzpuDwcV9Q4IZbBztQOpekVYci27o1Alomngn7CRzts a3D+exAWQyR/AFRxKZIROpDK92NtOYBAlmw97IqF8hPMFU0xDnud9bnOdwNeUHwBaz5c DRe/Ix+3Sc/lRE3Ay6x6dAXS9sXXecNUyQKvYpa5YRApFHmSwcaCZ2AyyToaYYJSQWIl Ippw== X-Received: by 10.236.140.130 with SMTP id e2mr3767998yhj.10.1378422509267; Thu, 05 Sep 2013 16:08:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.39.193 with SMTP id r1ls723787qek.30.gmail; Thu, 05 Sep 2013 16:08:29 -0700 (PDT) X-Received: by 10.58.67.9 with SMTP id j9mr10334803vet.22.1378422509183; Thu, 05 Sep 2013 16:08:29 -0700 (PDT) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id se9si7888623vdc.127.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Sep 2013 16:08:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id oy12so1092462veb.12 for ; Thu, 05 Sep 2013 16:08:29 -0700 (PDT) X-Gm-Message-State: ALoCoQnKhqqIZ4cdg8zWcQhLoduSfppZzD6U5ko7B5KtUNy9HF2ECz+AeQMnG6Z9zuKzPNTQvR3m X-Received: by 10.58.146.71 with SMTP id ta7mr9504518veb.23.1378422509072; Thu, 05 Sep 2013 16:08:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp307290vcz; Thu, 5 Sep 2013 16:08:28 -0700 (PDT) X-Received: by 10.180.75.16 with SMTP id y16mr8120058wiv.59.1378422507952; Thu, 05 Sep 2013 16:08:27 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id ma13si4045752wic.71.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Sep 2013 16:08:27 -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; Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1VHif5-0004t1-Ca for ; Thu, 05 Sep 2013 23:08:27 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 52822E9409 for ; Thu, 5 Sep 2013 23:08:27 +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: 672 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 672: Trival fix for error messaging Message-Id: <20130905230827.22015.1049.launchpad@ackee.canonical.com> Date: Thu, 05 Sep 2013 23:08:27 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16758"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 0756088b46828696aa0b7135c52d1b7844f0bc1c X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , ------------------------------------------------------------ revno: 672 committer: Tyler Baker branch nick: lava-dispatcher timestamp: Thu 2013-09-05 16:08:13 -0700 message: Trival fix for error messaging modified: lava_dispatcher/context.py lava_dispatcher/job.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/context.py' --- lava_dispatcher/context.py 2013-08-28 14:55:50 +0000 +++ lava_dispatcher/context.py 2013-09-05 23:08:13 +0000 @@ -126,6 +126,11 @@ proc.logfile_read = self.logfile_read return proc + def log(self, msg): + self.logfile_read.write(msg) + if not msg.endswith('\n'): + self.logfile_read.write('\n') + def run_command(self, command, failok=True): """run command 'command' with output going to output-dir if specified""" if isinstance(command, (str, unicode)): === modified file 'lava_dispatcher/job.py' --- lava_dispatcher/job.py 2013-09-05 17:05:29 +0000 +++ lava_dispatcher/job.py 2013-09-05 23:08:13 +0000 @@ -324,8 +324,8 @@ err_msg += "Lava failed on test: %s" % \ params.get('test_name', "Unknown") err_msg = err_msg + traceback.format_exc() - print("ErrorMessage: %s" % unicode(str(err))) - print err_msg + self.context.log("ErrorMessage: %s" % unicode(str(err))) + self.context.log(err_msg) else: logging.info( "[ACTION-E] %s is finished successfully." %