index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Werner Llácer <wllacer@gmail.com> | 2022-01-02 12:28:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 12:28:49 +0100 |
commit | b89408ab7ba89fe03b62c9ae7f3d32ce74ebc035 (patch) | |
tree | 6b539a4488b5fdd244ca21b6926de1c5f67e2f64 /examples | |
parent | e388537bc36534fe782e1e68a70ddcdb2e13e99a (diff) |
-rw-r--r-- | examples/guided.py | 15 |
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'): |