--- blivet/devices.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/blivet/devices.py b/blivet/devices.py index 4877a39..5772ec4 100644 --- a/blivet/devices.py +++ b/blivet/devices.py @@ -1531,6 +1531,20 @@ class PartitionDevice(StorageDevice): StorageDevice._postCreate(self) self._currentSize = self.partedPartition.getSize()
+ @exclusive + def create(self): + """ Create the device. """ + log_method_call(self, self.name, status=self.status) + self._preCreate() + try: + self._create() + except DiskLabelCommitError as e: + raise + except Exception as e: + raise DeviceCreateError(str(e), self.name) + else: + self._postCreate() + def _computeResize(self, partition): log_method_call(self, self.name, status=self.status)