Skip to content

Commit

Permalink
Add a _create method to BlivetDiskVolume.
Browse files Browse the repository at this point in the history
Relying on _reformat to create the formatting worked because a
DiskDevice always exists. Now that self._device can be an
optional, non-existent, LUKS layer on top of the disk we have to
make the disk volume class behave more like the other volume
classes -- namely, it has to create its format as part of _create
since we will not always call _reformat (eg: when we've set up,
but not yet created, a new LUKS layer on the disk).
  • Loading branch information
dwlehman committed Jun 10, 2020
1 parent 855f50d commit 3a94f34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/blivet.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ def _get_device_id(self):
def _type_check(self):
return self._device.raw_device.is_disk

def _create(self):
self._reformat()

def _look_up_device(self):
super(BlivetDiskVolume, self)._look_up_device()
if not self._get_device_id():
Expand Down

0 comments on commit 3a94f34

Please sign in to comment.