Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorvirtual-meme-machine <46010615+virtual-meme-machine@users.noreply.github.com>2022-08-01 07:56:08 +0000
committerGitHub <noreply@github.com>2022-08-01 09:56:08 +0200
commit956b34905b730d32eab839b7a4627ca0bb9e5b06 (patch)
tree67447d1f1b333f541a13b76b74b3b0ad2c115b81 /examples
parentcfea0d6d1a6f6b82fd4b65abd2124c8fc0530949 (diff)
- Fix KeyError exceptions (#1354)
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 8693b98f..0bb377a4 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -187,11 +187,12 @@ def perform_installation(mountpoint):
if installation.minimal_installation(testing=enable_testing, multilib=enable_multilib):
installation.set_locale(archinstall.arguments['sys-language'], archinstall.arguments['sys-encoding'].upper())
installation.set_hostname(archinstall.arguments['hostname'])
- if archinstall.arguments['mirror-region'].get("mirrors", None) is not None:
- installation.set_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors in the installation medium
- if archinstall.arguments['swap']:
+ if archinstall.arguments.get('mirror-region') is not None:
+ if archinstall.arguments.get("mirrors", None) is not None:
+ installation.set_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors in the installation medium
+ if archinstall.arguments.get('swap'):
installation.setup_swap('zram')
- if archinstall.arguments["bootloader"] == "grub-install" and archinstall.has_uefi():
+ if archinstall.arguments.get("bootloader") == "grub-install" and archinstall.has_uefi():
installation.add_additional_packages("grub")
installation.add_bootloader(archinstall.arguments["bootloader"])
@@ -274,7 +275,7 @@ if not (archinstall.check_mirror_reachable() or archinstall.arguments.get('skip-
archinstall.log(f"Arch Linux mirrors are not reachable. Please check your internet connection and the log file '{log_file}'.", level=logging.INFO, fg="red")
exit(1)
-if not archinstall.arguments['offline']:
+if not archinstall.arguments.get('offline'):
latest_version_archlinux_keyring = max([k.pkg_version for k in archinstall.find_package('archlinux-keyring')])
# If we want to check for keyring updates