Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/examples/guided.py b/examples/guided.py
index c394e596..6db06c7e 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -1,7 +1,6 @@
import json
import logging
import os
-import pathlib
import time
import archinstall
@@ -50,18 +49,6 @@ def load_config():
archinstall.storage['gfx_driver_packages'] = archinstall.AVAILABLE_GFX_DRIVERS.get(archinstall.arguments.get('gfx_driver', None), None)
if archinstall.arguments.get('servers', None) is not None:
archinstall.storage['_selected_servers'] = archinstall.arguments.get('servers', None)
- if archinstall.arguments.get('disk_layouts', None) is not None:
- if (dl_path := pathlib.Path(archinstall.arguments['disk_layouts'])).exists() and str(dl_path).endswith('.json'):
- try:
- with open(dl_path) as fh:
- archinstall.storage['disk_layouts'] = json.load(fh)
- except Exception as e:
- raise ValueError(f"--disk_layouts does not contain a valid JSON format: {e}")
- else:
- try:
- archinstall.storage['disk_layouts'] = json.loads(archinstall.arguments['disk_layouts'])
- except:
- raise ValueError("--disk_layouts=<json> needs either a JSON file or a JSON string given with a valid disk layout.")
def ask_user_questions():
@@ -212,7 +199,7 @@ def perform_filesystem_operations():
disk_layout_file.write(user_disk_layout)
print()
- if archinstall.arguments.get('dry-run'):
+ if archinstall.arguments.get('dry_run'):
exit(0)
if not archinstall.arguments.get('silent'):