def set_value(self, obj, value): if not isinstance(value, str) or value[-1] != '\0': raise ValueError( "NullStringField value must a string with last character == '\\0'." ) return CField.set_value(self, obj, value)
def set_value(self, obj, value): wrapper = ListItemWrapper(value) wrapper._set_action = self.item_set_value wrapper._get_action = self.item_get_value return CField.set_value(self, obj, wrapper)
def set_value(self, obj, value): if not isinstance(value, str) or value[-1] != '\0': raise ValueError("NullStringField value must a string with last character == '\\0'.") return CField.set_value(self, obj, value)