Merge "Reopen temporary system image to avoid stale data."

This commit is contained in:
Geremy Condra 2014-05-14 04:37:55 +00:00 committed by Android (Google) Code Review
commit abf1aa5305
1 changed files with 1 additions and 2 deletions

View File

@ -90,8 +90,7 @@ def BuildSystem(input_dir, info_dict, sparse=True, map_file=None):
mapdata = None
if sparse:
img.seek(os.SEEK_SET, 0)
data = img.read()
data = open(img.name).read()
img.close()
else:
success, name = build_image.UnsparseImage(img.name, replace=False)