adapt partition plugin to the new blockdevice interface
This commit is contained in:
parent
cbb499e7e3
commit
d08dbb1957
|
@ -172,7 +172,7 @@ class partition(cryptobox.plugins.base.CryptoBoxPlugin):
|
||||||
## the config partition is ignored, as it will get unmounted if necessary
|
## the config partition is ignored, as it will get unmounted if necessary
|
||||||
for dev in blockdevice.children:
|
for dev in blockdevice.children:
|
||||||
container = self.cbox.get_container(
|
container = self.cbox.get_container(
|
||||||
blockdevice_tools.get_blockdevice(dev).devnodes[0])
|
blockdevice_tools.get_blockdevice(dev))
|
||||||
if container and (container.is_mounted() or container.is_busy()):
|
if container and (container.is_mounted() or container.is_busy()):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
@ -544,8 +544,8 @@ class partition(cryptobox.plugins.base.CryptoBoxPlugin):
|
||||||
except (CBInvalidType, CBCreateError, CBVolumeIsActive), err_msg:
|
except (CBInvalidType, CBCreateError, CBVolumeIsActive), err_msg:
|
||||||
self.cbox.log.warn(err_msg)
|
self.cbox.log.warn(err_msg)
|
||||||
return False
|
return False
|
||||||
## remove unused volume entry
|
## remove unused volume entry in case it exists
|
||||||
if prev_name:
|
if prev_name and self.cbox.prefs.volumes_db.has_key(prev_name[0]):
|
||||||
del self.cbox.prefs.volumes_db[prev_name[0]]
|
del self.cbox.prefs.volumes_db[prev_name[0]]
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue