def create(self): """ Create the device. """ if self.exists: raise DeviceError("device already exists", self.name) try: self.createParents() self.setupParents() # should we use --zero for safety's sake? lvm.lvcreate(self.vg.name, self._name, self.size) except Exception: raise else: # FIXME set / update self.uuid here self.exists = True self.setup()
def create(self, intf=None): """ Create the device. """ if self.exists: raise LogicalVolumeError("device already exists", self.name) w = None if intf: w = intf.progressWindow(_("Creating device %s") % (self.path, )) try: self.createParents() self.setupParents() # should we use --zero for safety's sake? lvm.lvcreate(self.vg.name, self._name, self.size) except Exception, msg: raise LogicalVolumeError("Create device failed", self._name)
def create(self, intf=None): """ Create the device. """ if self.exists: raise LogicalVolumeError("device already exists", self.name) w = None if intf: w = intf.progressWindow(_("Creating device %s") % (self.path,)) try: self.createParents() self.setupParents() # should we use --zero for safety's sake? lvm.lvcreate(self.vg.name, self._name, self.size) except Exception, msg: raise LogicalVolumeError("Create device failed", self._name)
def create(self, intf=None): """ Create the device. """ if self.exists: raise DeviceError("device already exists", self.name) w = None if intf: w = intf.progressWindow(("Creating device %s") % (self.path,)) try: self.createParents() self.setupParents() # should we use --zero for safety's sake? lvm.lvcreate(self.vg.name, self._name, self.size) except Exception: raise else: # FIXME set / update self.uuid here self.exists = True self.setup() finally: if w: w.pop()