diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 607: Fix bug in concatinating str and int in boot_linaro_android_image

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

Commit Message

Senthil Kumaran May 21, 2013, 7:13 a.m. UTC
------------------------------------------------------------
revno: 607
committer: Senthil Kumaran <senthil.kumaran@linaro.org>
branch nick: trunk
timestamp: Tue 2013-05-21 12:41:59 +0530
message:
  Fix bug in concatinating str and int in boot_linaro_android_image
  attempts.
modified:
  lava_dispatcher/client/base.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/base.py'
--- lava_dispatcher/client/base.py	2013-05-20 14:25:22 +0000
+++ lava_dispatcher/client/base.py	2013-05-21 07:11:59 +0000
@@ -480,7 +480,12 @@ 
         in_linaro_android_image = False
 
         while (attempts < boot_attempts) and (not in_linaro_android_image):
-            logging.info("Booting the android test image. Attempt: %d" % attempts + 1)
+            logging.info("Booting the android test image. Attempt: %d" %
+                         (attempts + 1))
+            TESTER_PS1_PATTERN = self.target_device.deployment_data[
+                'TESTER_PS1_PATTERN']
+            timeout = self.config.android_boot_prompt_timeout
+
             try:
                 self._boot_linaro_android_image()
             except (OperationFailed, pexpect.TIMEOUT) as e:
@@ -489,8 +494,6 @@ 
                 attempts += 1
                 continue
 
-            TESTER_PS1_PATTERN = self.target_device.deployment_data['TESTER_PS1_PATTERN']
-            timeout = self.config.android_boot_prompt_timeout
             try:
                 wait_for_prompt(self.proc, TESTER_PS1_PATTERN, timeout=timeout)
             except pexpect.TIMEOUT: