diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py index eed911bfa..42f300687 100644 --- a/tools/releasetools/edify_generator.py +++ b/tools/releasetools/edify_generator.py @@ -117,7 +117,7 @@ def AssertOlderBuild(self, timestamp, timestamp_text): def AssertDevice(self, device): """Assert that the device identifier is the given string.""" cmd = ('assert(' + - ' || \0'.join(['getprop("ro.product.device") == "%s" || getprop("ro.build.product") == "%s"' + ' || '.join(['getprop("ro.product.device") == "%s" || getprop("ro.build.product") == "%s"' % (i, i) for i in device.split(",")]) + ' || abort("This package is for device: %s; ' + 'this device is " + getprop("ro.product.device") + ".");' + @@ -127,7 +127,7 @@ def AssertDevice(self, device): def AssertSomeBootloader(self, *bootloaders): """Asert that the bootloader version is one of *bootloaders.""" cmd = ("assert(" + - " ||\0".join(['getprop("ro.bootloader") == "%s"' % (b,) + " || ".join(['getprop("ro.bootloader") == "%s"' % (b,) for b in bootloaders]) + ");") self.script.append(self._WordWrap(cmd))