From eafdd2cd878c8fd23033302a2c5010505412981f Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Wed, 5 Feb 2014 11:28:51 -0800 Subject: [PATCH] Fix emulator builds which don't have boot.img. Change-Id: Id97a53c5356d435d9c70107ef047bed003769e22 --- tools/releasetools/common.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 80bb10aea..40a508941 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -339,9 +339,12 @@ def GetBootableImage(name, prebuilt_name, unpack_dir, tree_subdir, else: print "building image from target_files %s..." % (tree_subdir,) fs_config = "META/" + tree_subdir.lower() + "_filesystem_config.txt" - return File(name, BuildBootableImage(os.path.join(unpack_dir, tree_subdir), - os.path.join(unpack_dir, fs_config), - info_dict)) + data = BuildBootableImage(os.path.join(unpack_dir, tree_subdir), + os.path.join(unpack_dir, fs_config), + info_dict) + if data: + return File(name, data) + return None def UnzipTemp(filename, pattern=None):