Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorHugo Ankarloo <hugo@ilait.se>2021-09-20 20:17:39 +0200
committerHugo Ankarloo <hugo@ilait.se>2021-09-20 20:17:39 +0200
commit915ae88947a008a21006d2572e498ed0c134350c (patch)
tree4c5f009ebd9f30793cba26b44d7fab04fca219bd /archinstall
parentffbfafb35428168366de3ced572f648c6d49dc03 (diff)
Fix Bug: Set filesystem crashes if no partitions
File: lib/user_interaction.py When function manage_new_and_existing_partitions() is used, and no partitions are configured, and 'Set desired filesystem for a partition' is selected, the installer crashes.
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/user_interaction.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index 66dd3350..ca8fb6f6 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -730,7 +730,10 @@ def manage_new_and_existing_partitions(block_device :BlockDevice) -> dict:
block_device_struct["partitions"][block_device_struct["partitions"].index(partition)]['boot'] = not block_device_struct["partitions"][block_device_struct["partitions"].index(partition)].get('boot', False)
elif task == "Set desired filesystem for a partition":
- if (partition := generic_select(block_device_struct["partitions"], 'Select which partition to set a filesystem on: ', options_output=False)):
+ if not block_device_struct["partitions"]:
+ log("No partitions found. Create some partitions first", level=logging.WARNING, fg='yellow')
+ continue
+ elif (partition := generic_select(block_device_struct["partitions"], 'Select which partition to set a filesystem on: ', options_output=False)):
if not block_device_struct["partitions"][block_device_struct["partitions"].index(partition)].get('filesystem', None):
block_device_struct["partitions"][block_device_struct["partitions"].index(partition)]['filesystem'] = {}