Merge pull request #469 from archlinux/torxed-fix-467

Incorrect variable names being used from copy paste.
This commit is contained in:
Anton Hvornum 2021-05-18 07:24:24 +00:00 committed by GitHub
commit 5b3e1076ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ class luks2:
def encrypt(self, partition, password=None, key_size=512, hash_type='sha512', iter_time=10000, key_file=None):
if not self.partition.allow_formatting:
raise DiskError(f'Could not encrypt volume {self.partition} due to it having a formatting lock.')
raise DiskError(f'Could not encrypt volume {partition} due to it having a formatting lock.')
log(f'Encrypting {partition} (This might take a while)', level=logging.INFO)
@ -107,7 +107,7 @@ class luks2:
raise err
if cmd_handle.exit_code != 0:
raise DiskError(f'Could not encrypt volume "{partition.path}": {cmd_output}')
raise DiskError(f'Could not encrypt volume "{partition.path}": {b"".join(cmd_handle)}')
return key_file