@data.setter
    def data(self, string):
        log.debug("decode smart poster record " + repr(string))
        if len(string) > 0:
            f = io.BytesIO(string)
            while len(string) < f.tell():
                record = Record(data=f)
                if record.type == "urn:nfc:wkt:U":
                    self.uri = UriRecord(record).uri
                elif record.type == "urn:nfc:wkt:T":
                    record = TextRecord(record)
                    self.title[record.language] = record.text
                elif record.type == "urn:nfc:wkt:act":
                    self._action = ord(record.data)
                elif record.type == "urn:nfc:wkt:s":
                    self._res_size = struct.unpack('>L', record.data)
                elif record.type == "urn:nfc:wkt:t":
                    self._res_type = record.data
                elif record.type.startswith("image/"):
                    image_type = record.type.replace("image/", "", 1)
                    self.icons[image_type] = record.data
        else:
            log.error("nothing to parse")
dataset/ETHPy150Open javgh/greenaddress-pos-tools/nfc/ndef/smart_poster.py/SmartPosterRecord.data/swapped operands of `<`