This adds the set helper for list properties to allow list members to be
replaced with a new list. This is necessary as it is (currently) the
only way to replace the default value for a list member.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
obj._spdx[name] = []
return obj._spdx[name]
+ def set_helper(obj, value):
+ obj._spdx[name] = list(value)
+
def del_helper(obj):
del obj._spdx[name]
- attrs[name] = property(get_helper, None, del_helper)
+ attrs[name] = property(get_helper, set_helper, del_helper)
def init(self, source):
return [self.prop.init(o) for o in source]