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

Commit 3065c1b1 authored by Hongguang Chen's avatar Hongguang Chen Committed by Automerger Merge Worker
Browse files

Fix _ImportParser() error if property is imported from oem partition. am: 96c88287

Change-Id: I2fabd57984512b41d279b05e2bbafd49e88de91b
parents b27a8278 96c88287
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -807,8 +807,13 @@ class PartitionBuildProps(object):
    """Parses the build prop in a given import statement."""

    tokens = line.split()
    if len(tokens) != 2 or tokens[0] != 'import':
    if tokens[0] != 'import' or (len(tokens) != 2 and len(tokens) != 3) :
      raise ValueError('Unrecognized import statement {}'.format(line))

    if len(tokens) == 3:
      logger.info("Import %s from %s, skip", tokens[2], tokens[1])
      return {}

    import_path = tokens[1]
    if not re.match(r'^/{}/.*\.prop$'.format(self.partition), import_path):
      raise ValueError('Unrecognized import path {}'.format(line))