Skip to content

Commit

Permalink
Merge pull request #1616 from ogayot/raid1-path-fix
Browse files Browse the repository at this point in the history
filesystem: fix path property from Raid - override attribute
  • Loading branch information
ogayot authored Mar 27, 2023
2 parents 130809f + 6737e2c commit aac8eb4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion subiquity/models/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,16 +820,22 @@ def serialize_devices(self):
wipe = attr.ib(default=None)
ptable = attributes.ptable()
metadata = attr.ib(default=None)
path = attr.ib(default=None)
_path = attr.ib(default=None)
container = attributes.ref(backlink="_subvolumes", default=None) # Raid
_subvolumes = attributes.backlink(default=attr.Factory(list))

@property
def path(self):
if self._path is not None:
return self._path
# This is just here to make for_client(raid-with-partitions) work. It
# might not be very accurate.
return '/dev/md/' + self.name

@path.setter
def path(self, value):
self._path = value

@property
def size(self):
if self.preserve and self._m._probe_data:
Expand Down

0 comments on commit aac8eb4

Please sign in to comment.