def AssertDevice(self, device):
"""Assert that the device identifier is the given string."""
cmd = ('assert(' +
- ' || \0'.join(['getprop("ro.product.device") == "%s"' % i
+ ' || '.join(['getprop("ro.product.device") == "%s"' % i
for i in device.split(",")]) +
' || abort("E%d: This package is for device: %s; ' +
'this device is " + getprop("ro.product.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))
def AssertSomeBaseband(self, *basebands):
"""Assert that the baseband version is one of *basebands."""
cmd = ("assert(" +
- " ||\0".join(['getprop("ro.baseband") == "%s"' % (b,)
+ " || ".join(['getprop("ro.baseband") == "%s"' % (b,)
for b in basebands]) +
");")
self.script.append(self._WordWrap(cmd))