aboutsummaryrefslogtreecommitdiff
path: root/image_chromeos.py
diff options
context:
space:
mode:
authorHan Shen <shenhan@google.com>2015-03-25 12:03:12 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-03-26 18:44:26 +0000
commit96d936c087ef7a6b628f305b45f57c7a9ddd7994 (patch)
tree1001a2ed8baf1305992b9e8123dea911d6b6f278 /image_chromeos.py
parent004bccbd890f184ea873ad6ab8260808e1e79988 (diff)
downloadtoolchain-utils-96d936c087ef7a6b628f305b45f57c7a9ddd7994.tar.gz
Remove checking 'cros flash' locally.
The 'cros flash' location is changed recently, and since cros flash should be present everywhere, we just remove the local checking part. However, we keep the part that checks remote's cherrypi module. Change-Id: I3fa06e46eb3cb1d56c03f87ed5f9b632170fabcc Reviewed-on: https://chrome-internal-review.googlesource.com/210270 Reviewed-by: Caroline Tice <cmtice@google.com> Commit-Queue: Han Shen <shenhan@google.com> Tested-by: Han Shen <shenhan@google.com>
Diffstat (limited to 'image_chromeos.py')
-rwxr-xr-ximage_chromeos.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/image_chromeos.py b/image_chromeos.py
index d2f3ee00..3970a398 100755
--- a/image_chromeos.py
+++ b/image_chromeos.py
@@ -36,26 +36,21 @@ def Usage(parser, message):
def CheckForCrosFlash(chromeos_root, remote, log_level):
cmd_executer = command_executer.GetCommandExecuter(log_level=log_level)
- chroot_has_cros_flash = False
remote_has_cherrypy = False
- # Check to see if chroot contains cros flash.
- cros_flash_path = os.path.join(os.path.realpath(chromeos_root),
- "chromite/cros/commands/cros_flash.py")
-
- if os.path.exists(cros_flash_path):
- chroot_has_cros_flash = True
-
# Check to see if remote machine has cherrypy.
command = "python -c 'import cherrypy'"
retval = cmd_executer.CrosRunCommand (command,
chromeos_root=chromeos_root,
machine=remote)
- logger.GetLogger().LogFatalIf(retval == 255, "Failed ssh to %s" % remote)
+ logger.GetLogger().LogFatalIf(
+ retval == 255, "Failed ssh to %s (for checking cherrypy)" % remote)
if retval == 0:
remote_has_cherrypy = True
-
- return (chroot_has_cros_flash and remote_has_cherrypy)
+ else:
+ logger.GetLogger().LogWarning(("Failed to find cherrypy on remote '{}', "
+ "cros flash will fail.").format(remote))
+ return remote_has_cherrypy
def DoImage(argv):
"""Build ChromeOS."""