Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-02-17 12:12:49 +0100
committerAnton Hvornum <anton.feeds@gmail.com>2021-02-17 12:12:49 +0100
commit6e2d0c98eba28fa120c67378611deee442df1e30 (patch)
treeb04a1aadef2fffd35e75851f3386409dad712085
parent10f0567ead96655b933598bfb7729b18956ef4dc (diff)
Added some error handling when selecting a filesystem for partitions.
-rw-r--r--examples/guided.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 315be0d0..07b345f1 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -126,7 +126,18 @@ if archinstall.arguments['harddrive'].has_partitions():
break
mountpoint = input(f"Enter a mount-point for {partition}: ").strip(' ')
- new_filesystem = input(f"Enter a valid filesystem for {partition} (leave blank for {partition.filesystem}): ").strip(' ')
+
+ while 1:
+ new_filesystem = input(f"Enter a valid filesystem for {partition} (leave blank for {partition.filesystem}): ").strip(' ')
+ try:
+ partition.format(new_filesystem, path='/dev/null')
+ except UnknownFilesystemFormat:
+ archinstall.log(f"Selected filesystem is not supported yet, if you wish archinstall should support '{new_filesystem}' please create a issue-ticket suggesting it on github at https://github.com/Torxed/archinstall/issues.")
+ archinstall.log(f"Until then, please enter another supported filesystem.")
+ continue
+ except SysCallError:
+ pass # Supported, but mkfs could not format /dev/null which is the whole point of /dev/null in path :)
+ break
if len(mountpoint):
partition.allow_formatting = True