aboutsummaryrefslogtreecommitdiff
path: root/image_chromeos.py
diff options
context:
space:
mode:
authorZhizhou Yang <zhizhouy@google.com>2020-01-15 16:25:04 -0800
committerCommit Bot <commit-bot@chromium.org>2020-01-30 00:33:44 +0000
commit5534af8f4f31df22ca307e3e3faa16487fa3d2d2 (patch)
tree771f9865e956551c7c70c3de99fad0b72aef52ce /image_chromeos.py
parent658d77957b84def71c77d25229df9845fdb7ee9c (diff)
downloadtoolchain-utils-5534af8f4f31df22ca307e3e3faa16487fa3d2d2.tar.gz
crosperf: migration to python 3
This patch migrates crosperf and its utils to python 3. TEST=Passed presubmit check; tested with simple experiment locally. BUG=chromium:1011676 Change-Id: Ib2a9f9c7cf6a1bb1d0b42a1dd3d9e3cbb4d70a36 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2003796 Tested-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Caroline Tice <cmtice@chromium.org> Commit-Queue: Zhizhou Yang <zhizhouy@google.com> Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
Diffstat (limited to 'image_chromeos.py')
-rwxr-xr-ximage_chromeos.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/image_chromeos.py b/image_chromeos.py
index 726b5659..d5c404dd 100755
--- a/image_chromeos.py
+++ b/image_chromeos.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2019 The Chromium OS Authors. All rights reserved.
@@ -260,7 +260,7 @@ def DoImage(argv):
command = ' '.join(cros_flash_args)
# Workaround for crosbug.com/35684.
- os.chmod(misc.GetChromeOSKeyFile(options.chromeos_root), 0600)
+ os.chmod(misc.GetChromeOSKeyFile(options.chromeos_root), 0o600)
if log_level == 'average':
cmd_executer.SetLogLevel('verbose')
@@ -369,7 +369,7 @@ def LocateOrCopyImage(chromeos_root, image, board=None):
def GetImageMountCommand(image, rootfs_mp, stateful_mp):
image_dir = os.path.dirname(image)
image_file = os.path.basename(image)
- mount_command = ('cd ~/trunk/src/scripts &&'
+ mount_command = ('cd /mnt/host/source/src/scripts &&'
'./mount_gpt_image.sh --from=%s --image=%s'
' --safe --read_only'
' --rootfs_mountpt=%s'
@@ -462,7 +462,7 @@ def TryRemountPartitionAsRW(chromeos_root, remote, log_level):
## Safely ignore.
l.LogWarning('Failed to remount partition as rw, '
'probably the image was not built with '
- "\"--noenable_rootfs_verification\", "
+ '"--noenable_rootfs_verification", '
'you can safely ignore this.')
else:
l.LogOutput('Re-mounted partition as writable.')