encrypted devices won't always report as a child to a device, can't reliably look for a 'parent' of a encrypted drive when it doesn't show up. Hence, the DiskError() can't be raised just because we can't find a parent. The parent should be the current path if no other option was found.
This commit is contained in:
parent
b90820c1c0
commit
dabaebe221
|
|
@ -187,7 +187,8 @@ class Partition():
|
|||
for blockdevice in json.loads(b''.join(sys_command('lsblk -J')).decode('UTF-8'))['blockdevices']:
|
||||
if (parent := self.find_parent_of(blockdevice, os.path.basename(self.path))):
|
||||
return f"/dev/{parent}"
|
||||
raise DiskError(f'Could not find appropriate parent for encrypted partition {self}')
|
||||
# raise DiskError(f'Could not find appropriate parent for encrypted partition {self}')
|
||||
return self.path
|
||||
|
||||
def detect_inner_filesystem(self, password):
|
||||
log(f'Trying to detect inner filesystem format on {self} (This might take a while)', level=LOG_LEVELS.Info)
|
||||
|
|
|
|||
Loading…
Reference in New Issue