diff options
author | Doug Zongker <dougz@android.com> | 2009-08-04 15:14:01 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-08-04 15:14:01 -0700 |
commit | 1218b09012415b77800059cc63fc260f0a687149 (patch) | |
tree | c909fe5a4e6e4ced252ca893fc9aab2e5b620fb9 /tools/releasetools/common.py | |
parent | 7d7630cca8eff1252fbb3cc6ac75eb07617a13e9 (diff) | |
parent | 1aca962af153d6437937e3e687740d2c1c12657d (diff) | |
download | build-1218b09012415b77800059cc63fc260f0a687149.zip build-1218b09012415b77800059cc63fc260f0a687149.tar.gz build-1218b09012415b77800059cc63fc260f0a687149.tar.bz2 |
am 1aca962a: allow for malformed imagesizes.txt
Merge commit '1aca962af153d6437937e3e687740d2c1c12657d'
* commit '1aca962af153d6437937e3e687740d2c1c12657d':
allow for malformed imagesizes.txt
Diffstat (limited to 'tools/releasetools/common.py')
-rw-r--r-- | tools/releasetools/common.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 7cce669..8ca7781 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -53,8 +53,10 @@ def LoadMaxSizes(): OPTIONS.max_image_size = {} try: for line in open(os.path.join(OPTIONS.input_tmp, "META", "imagesizes.txt")): - image, size = line.split() - size = int(size) + pieces = line.split() + if len(pieces) != 2: continue + image = pieces[0] + size = int(pieces[1]) OPTIONS.max_image_size[image + ".img"] = size except IOError, e: if e.errno == errno.ENOENT: |