From 37b1e618280c8b428824f202902e392792e10c18 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 14 Mar 2021 14:00:52 +0100 Subject: Corrected some spelling errors and wrong variables. --- examples/guided.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'examples') diff --git a/examples/guided.py b/examples/guided.py index 74d413aa..4e6aaf34 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -308,15 +308,11 @@ def perform_installation(device, boot_partition, language, mirrors): if archinstall.arguments.get('profile', None): installation.install_profile(archinstall.arguments.get('profile', None)) - if archinstall.arguments.get('users', None): - for user in archinstall.arguments.get('users'): - password = users[user] - installation.user_create(user, password, sudo=False) - if archinstall.arguments.get('superusers', None): - for user in archinstall.arguments.get('users'): - password = users[user] - installation.user_create(user, password, sudo=Tru) - + 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 (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw): installation.user_set_pw('root', root_pw) -- cgit v1.2.3-54-g00ecf