Fix up _CheckSecondTokenNotSlotSuffixed function.

Incremental OTA generation was failing since the
function _CheckSecondTokenNotSlotSuffixed was in
broken state, this change fixes the same.

Bug: 160215626
Test: Incremental OTA now gets generated and applied
      successfully a non-ab device.

Change-Id: Ifb3886396fe65dcdaeba16c568419b9fa084193d
Merged-In: Ifb3886396fe65dcdaeba16c568419b9fa084193d
This commit is contained in:
P.Adarsh Reddy 2020-07-01 00:30:59 +05:30 committed by Yifan Hong
parent 6c9441a924
commit 1ed2d66259
1 changed files with 3 additions and 3 deletions

View File

@ -374,12 +374,12 @@ class EdifyGenerator(object):
def _CheckSecondTokenNotSlotSuffixed(self, s, fn):
lst = s.split(':')
assert(len(s) == 4), "{} does not contain 4 tokens".format(s)
assert(len(lst) == 4), "{} does not contain 4 tokens".format(s)
if self.fstab:
entry = common.GetEntryForDevice(s[1])
entry = common.GetEntryForDevice(self.fstab, lst[1])
if entry is not None:
assert not entry.slotselect, \
"Use %s because %s is slot suffixed" % (fn, s[1])
"Use %s because %s is slot suffixed" % (fn, lst[1])
def WriteRawImage(self, mount_point, fn, mapfn=None):
"""Write the given package file into the partition for the given