am 1aca962a: allow for malformed imagesizes.txt

Merge commit '1aca962af153d6437937e3e687740d2c1c12657d'

* commit '1aca962af153d6437937e3e687740d2c1c12657d':
  allow for malformed imagesizes.txt
This commit is contained in:
Doug Zongker
2009-08-04 15:14:01 -07:00
committed by Android Git Automerger

View File

@@ -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: