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

Commit 465b5033 authored by Yifan Hong's avatar Yifan Hong Committed by Automerger Merge Worker
Browse files

Merge "GetBootImageBuildProp returns None if file does not exist" am: 7a27574e

Original change: https://android-review.googlesource.com/c/platform/build/+/1548355

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4232495e6972c23a7cd8e159a44174e78c1a53c5
parents b27d9c66 7a27574e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3672,14 +3672,13 @@ def GetBootImageBuildProp(boot_img):
    RunAndCheckOutput(['toybox', 'cpio', '-F', abs_uncompressed_ramdisk, '-i'],
               cwd=extracted_ramdisk)

    prop_file = None
    for search_path in RAMDISK_BUILD_PROP_REL_PATHS:
      prop_file = os.path.join(extracted_ramdisk, search_path)
      if os.path.isfile(prop_file):
        break
        return prop_file
      logger.warning('Unable to get boot image timestamp: no %s in ramdisk', search_path)

    return prop_file
    return None

  except ExternalError as e:
    logger.warning('Unable to get boot image build props: %s', e)