Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filesystem: fix path property from Raid - override attribute
The following commmit: ce146ab add .path to Raid so for_client(raid-with-partitions) works introduced a (read only) path property for Raid objects, returning an imaginary value to make for_client work with Raid objects. Later on, the following commit: 8e65899 add "path" attributes to fs model objects that curtin now provides a path for introduced a (read/write) path attribute to all filesystem objects. For Raid however, the property still takes precedence over the new attribute of the same name, so doing raid.path = x is invalid (no setter) and results in the following exception: AttributeError: can't set attribute 'path' Fixed by using a @Property + @Setter attribute for path. The getter returns the actual path if it exists, otherwise returns the same imaginary value as before. Signed-off-by: Olivier Gayot <[email protected]>
- Loading branch information