Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/swiss.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/swiss.py')
-rw-r--r--examples/swiss.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/swiss.py b/examples/swiss.py
index cf864ed5..6f524103 100644
--- a/examples/swiss.py
+++ b/examples/swiss.py
@@ -415,11 +415,13 @@ def os_setup(installation):
if archinstall.arguments.get('profile', None):
installation.install_profile(archinstall.arguments.get('profile', None))
- for user, user_info in archinstall.arguments.get('!users', {}).items():
- installation.user_create(user, user_info["!password"], sudo=False)
+ if archinstall.arguments.get('!users',{}):
+ for user, user_info in archinstall.arguments.get('!users', {}).items():
+ installation.user_create(user, user_info["!password"], sudo=False)
- for superuser, user_info in archinstall.arguments.get('!superusers', {}).items():
- installation.user_create(superuser, user_info["!password"], sudo=True)
+ if archinstall.arguments.get('!superusers',{}):
+ for superuser, user_info in archinstall.arguments.get('!superusers', {}).items():
+ installation.user_create(superuser, user_info["!password"], sudo=True)
if timezone := archinstall.arguments.get('timezone', None):
installation.set_timezone(timezone)