Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-02-07 15:28:26 +0100
committerAnton Hvornum <anton@hvornum.se>2021-02-07 15:28:26 +0100
commit3dcf8ced6ceed483d1eb6a8212ae5fd79d14ad6c (patch)
tree1659768b484f661e4c0ccfb156eb6c686dd0b8f4 /archinstall/lib
parent15aa16c4256079de97d530df280def65e92fd30b (diff)
Fixed correct variable usage for path when formatting, enabling temporary override.
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/disk.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index b416780c..c721c90e 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -159,26 +159,26 @@ class Partition():
log(f'Formatting {path} -> {filesystem}', level=LOG_LEVELS.Info)
if filesystem == 'btrfs':
- o = b''.join(sys_command(f'/usr/bin/mkfs.btrfs -f {self.path}'))
+ o = b''.join(sys_command(f'/usr/bin/mkfs.btrfs -f {path}'))
if b'UUID' not in o:
- raise DiskError(f'Could not format {self.path} with {filesystem} because: {o}')
+ raise DiskError(f'Could not format {path} with {filesystem} because: {o}')
self.filesystem = 'btrfs'
elif filesystem == 'vfat':
- o = b''.join(sys_command(f'/usr/bin/mkfs.vfat -F32 {self.path}'))
+ o = b''.join(sys_command(f'/usr/bin/mkfs.vfat -F32 {path}'))
if (b'mkfs.fat' not in o and b'mkfs.vfat' not in o) or b'command not found' in o:
- raise DiskError(f'Could not format {self.path} with {filesystem} because: {o}')
+ raise DiskError(f'Could not format {path} with {filesystem} because: {o}')
self.filesystem = 'vfat'
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)}')
+ if (handle := sys_command(f'/usr/bin/mkfs.ext4 -F {path}')).exit_code != 0:
+ raise DiskError(f'Could not format {path} with {filesystem} because: {b"".join(handle)}')
self.filesystem = 'ext4'
elif filesystem == 'xfs':
- if (handle:= sys_command(f'/usr/bin/mkfs.xfs -f {self.path}')).exit_code != 0:
- raise DiskError(f'Could not format {self.path} with {filesystem} because: {b"".join(handle)}')
+ if (handle:= sys_command(f'/usr/bin/mkfs.xfs -f {path}')).exit_code != 0:
+ raise DiskError(f'Could not format {path} with {filesystem} because: {b"".join(handle)}')
self.filesystem = 'xfs'
elif filesystem == 'f2fs':
- if (handle:= sys_command(f'/usr/bin/mkfs.f2fs -f {self.path}')).exit_code != 0:
- raise DiskError(f'Could not format {self.path} with {filesystem} because: {b"".join(handle)}')
+ if (handle:= sys_command(f'/usr/bin/mkfs.f2fs -f {path}')).exit_code != 0:
+ raise DiskError(f'Could not format {path} with {filesystem} because: {b"".join(handle)}')
self.filesystem = 'f2fs'
else:
raise UnknownFilesystemFormat(f"Fileformat '{filesystem}' is not yet implemented.")