Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorHimadri Bhattacharjee <107522312+lavafroth@users.noreply.github.com>2023-02-28 14:46:38 +0000
committerGitHub <noreply@github.com>2023-02-28 15:46:38 +0100
commit2559e0dc10a34735e6f694e7edc33c7e4eec0778 (patch)
treebaec80454bd52c95bcd4264dbf1936e1177fa4d4 /archinstall
parentb41d7017277c4ffde3b423cf34e3a61301a5ca35 (diff)
Uses dict setdefault instead of manually checking if key-value pair exists. (#1657)
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/__init__.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/archinstall/__init__.py b/archinstall/__init__.py
index 6a4c768e..bb1b9405 100644
--- a/archinstall/__init__.py
+++ b/archinstall/__init__.py
@@ -221,11 +221,8 @@ def load_config():
selected_region = arguments.get('mirror-region', None)
arguments['mirror-region'] = {selected_region: list_mirrors()[selected_region]}
- if arguments.get('sys-language', None) is not None:
- arguments['sys-language'] = arguments.get('sys-language', 'en_US')
-
- if arguments.get('sys-encoding', None) is not None:
- arguments['sys-encoding'] = arguments.get('sys-encoding', 'utf-8')
+ arguments.setdefault('sys-language', 'en_US')
+ arguments.setdefault('sys-encoding', 'utf-8')
if arguments.get('gfx_driver', None) is not None:
storage['gfx_driver_packages'] = AVAILABLE_GFX_DRIVERS.get(arguments.get('gfx_driver', None), None)