Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-02-07 15:34:11 +0100
committerAnton Hvornum <anton@hvornum.se>2021-02-07 15:34:11 +0100
commitacf39296efd905e6b2a495468555c6b8a8976cbc (patch)
treebe8797f142574dcb7ae2ace02425592cadb5ded7 /archinstall
parent1253982c30c5d2454f8e1b285e586a6f48929e3c (diff)
Added a check in guided to make it more visible that we check for filesystem supportation.
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/disk.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py
index 8eb4b54d..d2bac3d2 100644
--- a/archinstall/lib/disk.py
+++ b/archinstall/lib/disk.py
@@ -113,7 +113,6 @@ class BlockDevice():
return True
return False
-
class Partition():
def __init__(self, path, part_id=None, size=-1, filesystem=None, mountpoint=None, encrypted=False):
if not part_id:
@@ -138,15 +137,6 @@ class Partition():
self.mountpoint = partition_info['target']
self.filesystem = partition_info['fstype']
- # We perform a dummy format on /dev/null with the given filesystem-type
- # in order to determain if we support it or not.
- try:
- self.format(self.filesystem, '/dev/null')
- except SysCallError:
- pass # We supported it, but /dev/null is not formatable as expected so the mkfs call exited with an error code
- except UnknownFilesystemFormat as err:
- raise err
-
def __repr__(self, *args, **kwargs):
if self.encrypted:
return f'Partition(path={self.path}, real_device={self.real_device}, fs={self.filesystem}, mounted={self.mountpoint})'
@@ -217,6 +207,17 @@ class Partition():
self.mountpoint = target
return True
+ def filesystem_supported(self):
+ # We perform a dummy format on /dev/null with the given filesystem-type
+ # in order to determain if we support it or not.
+ try:
+ self.format(self.filesystem, '/dev/null')
+ except SysCallError:
+ pass # We supported it, but /dev/null is not formatable as expected so the mkfs call exited with an error code
+ except UnknownFilesystemFormat as err:
+ raise err
+ return True
+
class Filesystem():
# TODO:
# When instance of a HDD is selected, check all usages and gracefully unmount them