Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1aca962a authored by Doug Zongker's avatar Doug Zongker
Browse files

allow for malformed imagesizes.txt

Some builds have blank values for max image sizes; ignore these lines.
parent b6153173
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -52,8 +52,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: