Added key error correction again by creating default value. Should do this for all of them really.

This commit is contained in:
Anton Hvornum 2020-11-11 20:37:36 +00:00
parent 9ad56f3462
commit a9099cbb46
1 changed files with 8 additions and 6 deletions

View File

@ -58,6 +58,7 @@ def perform_installation(device, boot_partition, language, mirrors):
if 'profile' in archinstall.storage['_guided'] and len(profile := archinstall.storage['_guided']['profile']['path'].strip()): if 'profile' in archinstall.storage['_guided'] and len(profile := archinstall.storage['_guided']['profile']['path'].strip()):
installation.install_profile(profile) installation.install_profile(profile)
if archinstall.storage['_guided']['users']:
for user in archinstall.storage['_guided']['users']: for user in archinstall.storage['_guided']['users']:
password = users[user] password = users[user]
@ -124,6 +125,7 @@ new_user_text = 'Any additional users to install (leave blank for no users): '
if len(root_pw.strip()) == 0: if len(root_pw.strip()) == 0:
new_user_text = 'Create a super-user with sudo privileges: ' new_user_text = 'Create a super-user with sudo privileges: '
archinstall.storage['_guided']['users'] = None
while 1: while 1:
new_user = input(new_user_text) new_user = input(new_user_text)
if len(new_user.strip()) == 0: if len(new_user.strip()) == 0: