[displaymanager] Massage do_autologin
- Move getting the global setting closer to where it is used - Initialize variable
This commit is contained in:
parent
59a003a41f
commit
229cc241fa
@ -731,7 +731,6 @@ def run():
|
|||||||
"globalstorage and displaymanager.conf."
|
"globalstorage and displaymanager.conf."
|
||||||
)
|
)
|
||||||
|
|
||||||
username = libcalamares.globalstorage.value("autologinUser")
|
|
||||||
root_mount_point = libcalamares.globalstorage.value("rootMountPoint")
|
root_mount_point = libcalamares.globalstorage.value("rootMountPoint")
|
||||||
|
|
||||||
if "default_desktop_environment" in libcalamares.job.configuration:
|
if "default_desktop_environment" in libcalamares.job.configuration:
|
||||||
@ -767,11 +766,12 @@ def run():
|
|||||||
libcalamares.utils.debug("{!s} selected but not installed".format(dm))
|
libcalamares.utils.debug("{!s} selected but not installed".format(dm))
|
||||||
displaymanagers.remove(dm)
|
displaymanagers.remove(dm)
|
||||||
|
|
||||||
|
username = libcalamares.globalstorage.value("autologinUser")
|
||||||
if username is not None:
|
if username is not None:
|
||||||
libcalamares.utils.debug(
|
do_autologin = True
|
||||||
"Setting up autologin for user {!s}.".format(username)
|
libcalamares.utils.debug("Setting up autologin for user {!s}.".format(username))
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
|
do_autologin = False
|
||||||
libcalamares.utils.debug("Unsetting autologin.")
|
libcalamares.utils.debug("Unsetting autologin.")
|
||||||
|
|
||||||
libcalamares.globalstorage.insert("displayManagers", displaymanagers)
|
libcalamares.globalstorage.insert("displayManagers", displaymanagers)
|
||||||
|
Loading…
Reference in New Issue
Block a user