From patchwork Tue Jul 9 15:11:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Baker X-Patchwork-Id: 18291 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A9A2D25DFF for ; Tue, 9 Jul 2013 15:11:15 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id q12sf6976973vbe.9 for ; Tue, 09 Jul 2013 08:11:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to :mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state:x-original-sender :x-original-authentication-results:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=xge2K9991yU3fVBJTmVMRb5Rby5oK2OJ2Cao33FKOAA=; b=Z9Rk04BySRVJ4g6thd3UBotLR7fUiZzQHGkTjp2zS/jd6Hi20tDIbmys4q0TcATcey J3cH/MdlG1hzYVFM3R7+o8Joj6x3diBbSo6UTfY9DEnVmwrBiGHw1wvqxKlxIBeY02XL VGj8DTFgGEoWNSLpse8f4KjUM6hnmAVp8tHJgSW6nIVmWn5EocIHzX7cHOC7gRyUDu3m ZgF0LIHH6lu+5RSgve802s3pTvjzWpK9NkcOaMSqzeMrFUrztRaXt+0kZmyRrAp8WPIO RrtyLQDbzXqGKfwGe0sYFn0+T7uFgbirCr25i7YbL1TLgVuIP2+ddXCP8T1vKZ48E4uF Pdog== X-Received: by 10.236.20.83 with SMTP id o59mr14615396yho.28.1373382674956; Tue, 09 Jul 2013 08:11:14 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.96.233 with SMTP id dv9ls2296793qeb.81.gmail; Tue, 09 Jul 2013 08:11:14 -0700 (PDT) X-Received: by 10.52.245.3 with SMTP id xk3mr14133013vdc.57.1373382674714; Tue, 09 Jul 2013 08:11:14 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id to9si7806600vdc.58.2013.07.09.08.11.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Jul 2013 08:11:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id f12so4479106vbg.39 for ; Tue, 09 Jul 2013 08:11:14 -0700 (PDT) X-Received: by 10.58.154.34 with SMTP id vl2mr10809050veb.35.1373382674286; Tue, 09 Jul 2013 08:11:14 -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.149.77 with SMTP id s13csp35254vcv; Tue, 9 Jul 2013 08:11:13 -0700 (PDT) X-Received: by 10.14.206.196 with SMTP id l44mr31183234eeo.142.1373382673176; Tue, 09 Jul 2013 08:11:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id u9si20799501eeg.291.2013.07.09.08.11.12 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 09 Jul 2013 08:11:13 -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 1UwZZQ-0005n5-Ei for ; Tue, 09 Jul 2013 15:11:12 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 5E4E6E1BF0 for ; Tue, 9 Jul 2013 15:11:12 +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: 635 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 635: Strip the newline from the end of get_power_status Message-Id: <20130709151112.31410.48780.launchpad@ackee.canonical.com> Date: Tue, 09 Jul 2013 15:11:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16696"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 5de5a420fe26809709d722a3c392997a9de19f09 X-Gm-Message-State: ALoCoQniMz43Nqis8zeMuk5zQVmAjW3PxtaTL9aCeDjCjukoffpNhu5CdSProRn10O4AB51Fx8e0 X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.52 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: , Merge authors: Arthur She (arthur-she) Related merge proposals: https://code.launchpad.net/~arthur-she/lava-dispatcher/add-get_power_status-to-ipmi/+merge/172075 proposed by: Arthur She (arthur-she) review: Approve - Tyler Baker (tyler-baker) ------------------------------------------------------------ revno: 635 [merge] committer: Tyler Baker branch nick: lava-dispatcher timestamp: Tue 2013-07-09 08:10:39 -0700 message: Strip the newline from the end of get_power_status modified: lava_dispatcher/ipmi.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/ipmi.py' --- lava_dispatcher/ipmi.py 2013-07-09 05:54:26 +0000 +++ lava_dispatcher/ipmi.py 2013-07-09 14:48:10 +0000 @@ -64,8 +64,9 @@ def get_power_status(self): """ Command 'ipmitool power status' will output 'Chassis Power is on' - or 'Chassis Power is off' """ - return self.__ipmi_cmd_output("power status").split(' ')[-1] + or 'Chassis Power is off'. + Before we return the last string, the '\n' needs to be strip.""" + return self.__ipmi_cmd_output("power status").split(' ')[-1].rstrip() class IpmiPxeBoot(object): """