Fixes #88 - ext4 paritions incorrectly labeled

This commit is contained in:
Anton Hvornum 2021-01-21 20:21:31 +01:00 committed by GitHub
parent 5927060133
commit 89bb819af2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ class Partition():
elif filesystem == 'ext4':
if (handle := sys_command(f'/usr/bin/mkfs.ext4 -F {self.path}')).exit_code != 0:
raise DiskError(f'Could not format {self.path} with {filesystem} because: {b"".join(handle)}')
self.filesystem = 'fat32'
self.filesystem = 'ext4'
else:
raise DiskError(f'Fileformat {filesystem} is not yet implemented.')
return True
@ -293,4 +293,4 @@ def harddrive(size=None, model=None, fuzzy=False):
if model and (collection[drive]['model'] is None or collection[drive]['model'].lower() != model.lower()):
continue
return collection[drive]
return collection[drive]