diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 541: ensure device isn't power_on before calling power_on

Message ID 20130123044313.27277.90979.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Andy Doan Jan. 23, 2013, 4:43 a.m. UTC
Merge authors:
  Andy Doan (doanac)
Related merge proposals:
  https://code.launchpad.net/~doanac/lava-dispatcher/fm-licensing-bug/+merge/144415
  proposed by: Andy Doan (doanac)
  review: Approve - Michael Hudson-Doyle (mwhudson)
------------------------------------------------------------
revno: 541 [merge]
committer: Andy Doan <andy.doan@linaro.org>
branch nick: dpatcher
timestamp: Tue 2013-01-22 22:37:43 -0600
message:
  ensure device isn't power_on before calling power_on
modified:
  lava_dispatcher/client/targetdevice.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/client/targetdevice.py'
--- lava_dispatcher/client/targetdevice.py	2012-11-21 22:07:45 +0000
+++ lava_dispatcher/client/targetdevice.py	2013-01-22 23:50:06 +0000
@@ -66,6 +66,9 @@ 
             self.target_device.deploy_linaro_prebuilt(image)
 
     def _boot_linaro_image(self):
+        if self.proc:
+            logging.warning('device already powered on, powering off first')
+            self.target_device.power_off(self.proc)
         self.proc = self.target_device.power_on()
 
     def _boot_linaro_android_image(self):