diff mbox

[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
State Accepted
Headers show

Commit Message

Tyler Baker July 9, 2013, 3:11 p.m. UTC
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 <tyler.baker@linaro.org>
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
diff mbox

Patch

=== 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):
     """