Don't assume 'User' exists in autologin section.

This commit is contained in:
Bernhard Landauer 2017-01-21 02:53:43 +01:00
parent 64ca3857c3
commit 5392615053

View File

@ -267,7 +267,7 @@ def set_autologin(username, displaymanagers, default_desktop_environment, root_m
if do_autologin: if do_autologin:
autologin_section['User'] = username autologin_section['User'] = username
else: elif 'User' in autologin_section:
del autologin_section['User'] del autologin_section['User']
if default_desktop_environment is not None: if default_desktop_environment is not None: