[displaymanager] set_autologin: Unset autologin for sddm when needed

This commit is contained in:
Philip 2016-12-06 21:57:31 +01:00
parent b6e0e226a1
commit 0bd31b0404

View File

@ -267,14 +267,12 @@ def set_autologin(username, displaymanagers, default_desktop_environment, root_m
if do_autologin:
autologin_section['User'] = username
else:
del autologin_section['User']
if default_desktop_environment is not None:
autologin_section['Session'] = default_desktop_environment.desktop_file
if autologin_section:
if 'Autologin' in sddm_config:
sddm_config['Autologin'].update(autologin_section)
else:
sddm_config['Autologin'] = autologin_section
with open(sddm_conf_path, 'w') as sddm_config_file: