aboutsummaryrefslogtreecommitdiff
path: root/crosperf/download_images.py
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2016-11-01 12:56:25 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-11-01 15:50:24 -0700
commitc39917fe61858e884d06656122cf88a8c66fd825 (patch)
tree4281d50331476710319707d3d15d613690cea646 /crosperf/download_images.py
parentd768dc1c6dbd2cdc8f2503574e88ad88316e24f2 (diff)
downloadtoolchain-utils-c39917fe61858e884d06656122cf88a8c66fd825.tar.gz
Update formatting of files before committing changes for autotest. No functional change.
BUG: chromium:647429 TEST: crosperf unit tests Change-Id: I827f9ec4d00a0d8c1ae8a9930d7832289e694dc8 Reviewed-on: https://chrome-internal-review.googlesource.com/301457 Commit-Ready: Manoj Gupta <manojgupta@google.com> Tested-by: Manoj Gupta <manojgupta@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'crosperf/download_images.py')
-rw-r--r--crosperf/download_images.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/crosperf/download_images.py b/crosperf/download_images.py
index da0b4e37..c07d82d0 100644
--- a/crosperf/download_images.py
+++ b/crosperf/download_images.py
@@ -1,7 +1,6 @@
# Copyright (c) 2014-2015 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-
"""Download images from Cloud Storage."""
from __future__ import print_function
@@ -25,16 +24,15 @@ class ImageDownloader(object):
self._logger = logger_to_use
self.log_level = log_level
self._ce = cmd_exec or command_executer.GetCommandExecuter(
- self._logger,
- log_level=self.log_level)
+ self._logger, log_level=self.log_level)
def GetBuildID(self, chromeos_root, xbuddy_label):
# Get the translation of the xbuddy_label into the real Google Storage
# image name.
command = ('cd ~/trunk/src/third_party/toolchain-utils/crosperf; '
"python translate_xbuddy.py '%s'" % xbuddy_label)
- _, build_id_tuple_str, _ = self._ce.ChrootRunCommandWOutput(
- chromeos_root, command)
+ _, build_id_tuple_str, _ = self._ce.ChrootRunCommandWOutput(chromeos_root,
+ command)
if not build_id_tuple_str:
raise MissingImage("Unable to find image for '%s'" % xbuddy_label)
@@ -65,15 +63,15 @@ class ImageDownloader(object):
downloaded_image_name = os.path.join(download_path,
'chromiumos_test_image.tar.xz')
if status != 0 or not os.path.exists(downloaded_image_name):
- raise MissingImage('Cannot download image: %s.'
- % downloaded_image_name)
+ raise MissingImage('Cannot download image: %s.' % downloaded_image_name)
return image_path
def UncompressImage(self, chromeos_root, build_id):
# Check to see if the file has already been uncompresssed, etc.
- if os.path.exists(os.path.join(chromeos_root, 'chroot/tmp', build_id,
- 'chromiumos_test_image.bin')):
+ if os.path.exists(
+ os.path.join(chromeos_root, 'chroot/tmp', build_id,
+ 'chromiumos_test_image.bin')):
return
# Uncompress and untar the downloaded image.