示例#1
0
    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)
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 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)