commit
5f9966b5c1
|
|
@ -94,8 +94,8 @@ class luks2():
|
|||
else:
|
||||
raise err
|
||||
|
||||
if b'Command successful.' not in b''.join(cmd_handle):
|
||||
raise DiskError(f'Could not encrypt volume "{partition.path}": {o}')
|
||||
if b'Command successful.' not in (cmd_output := b''.join(cmd_handle)):
|
||||
raise DiskError(f'Could not encrypt volume "{partition.path}": {cmd_output}')
|
||||
|
||||
return key_file
|
||||
|
||||
|
|
@ -126,4 +126,4 @@ class luks2():
|
|||
|
||||
def format(self, path):
|
||||
if (handle := sys_command(f"/usr/bin/cryptsetup -q -v luksErase {path}")).exit_code != 0:
|
||||
raise DiskError(f'Could not format {path} with {self.filesystem} because: {b"".join(handle)}')
|
||||
raise DiskError(f'Could not format {path} with {self.filesystem} because: {b"".join(handle)}')
|
||||
|
|
|
|||
Loading…
Reference in New Issue