[displaymanager] Fix naming

- Having a global and a class-local function with the same name
   that do very different things is confusing.
This commit is contained in:
Adriaan de Groot 2019-09-30 12:41:05 +02:00
parent fb07757aab
commit a3666cabe0
2 changed files with 5 additions and 5 deletions

View file

@ -20,9 +20,9 @@ displaymanagers:
# support configuring a default DE, so the keys are mandatory # support configuring a default DE, so the keys are mandatory
# but their interpretation is up to the DM configuration. # but their interpretation is up to the DM configuration.
# #
# Subkeys of *defaultDesktopEnvironment* are: # Subkeys of *defaultDesktopEnvironment* are (all mandatory):
# - *executable* a full path to an executable (manda) # - *executable* a full path to an executable
# - *desktopFile* a .desktop filename (optional) # - *desktopFile* a .desktop filename
# #
# If this is **not** set, then Calamares will look for installed # If this is **not** set, then Calamares will look for installed
# DE's and pick the first one it finds. # DE's and pick the first one it finds.

View file

@ -83,7 +83,7 @@ class DesktopEnvironment:
return candidate return candidate
return None return None
def find_desktop_environment(self, root_mount_point): def is_installed(self, root_mount_point):
""" """
Check if this environment is installed in the Check if this environment is installed in the
target system at @p root_mount_point. target system at @p root_mount_point.
@ -144,7 +144,7 @@ def find_desktop_environment(root_mount_point):
""" """
libcalamares.utils.debug("Using rootMountPoint {!r}".format(root_mount_point)) libcalamares.utils.debug("Using rootMountPoint {!r}".format(root_mount_point))
for desktop_environment in desktop_environments: for desktop_environment in desktop_environments:
if desktop_environment.find_desktop_environment(root_mount_point): if desktop_environment.is_installed(root_mount_point):
libcalamares.utils.debug(".. selected DE {!s}".format(desktop_environment.desktop_file)) libcalamares.utils.debug(".. selected DE {!s}".format(desktop_environment.desktop_file))
return desktop_environment return desktop_environment
return None return None