mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 09:25:36 -04:00
Replace scandir with listdir, simplify loop
FIXES: ??
This commit is contained in:
parent
ca60a7fc16
commit
c8fd11b103
1 changed files with 4 additions and 8 deletions
|
@ -480,12 +480,9 @@ def run():
|
||||||
)
|
)
|
||||||
|
|
||||||
if (os.path.exists(greeter_path)):
|
if (os.path.exists(greeter_path)):
|
||||||
greeter_configured = False
|
|
||||||
|
|
||||||
# configure first found lightdm-greeter
|
# configure first found lightdm-greeter
|
||||||
for entry in os.scandir(greeter_path):
|
for entry in os.listdir(greeter_path):
|
||||||
if entry.name.endswith('.desktop') \
|
if entry.name.endswith('.desktop'):
|
||||||
and not greeter_configured:
|
|
||||||
greeter = entry.name.split('.')[0]
|
greeter = entry.name.split('.')[0]
|
||||||
libcalamares.utils.debug(
|
libcalamares.utils.debug(
|
||||||
"found greeter {!s}".format(greeter)
|
"found greeter {!s}".format(greeter)
|
||||||
|
@ -500,9 +497,8 @@ def run():
|
||||||
libcalamares.utils.debug(
|
libcalamares.utils.debug(
|
||||||
"{!s} configured as greeter.".format(greeter)
|
"{!s} configured as greeter.".format(greeter)
|
||||||
)
|
)
|
||||||
greeter_configured = True
|
break
|
||||||
|
else:
|
||||||
if not greeter_configured:
|
|
||||||
return ("No lightdm greeter installed.")
|
return ("No lightdm greeter installed.")
|
||||||
else:
|
else:
|
||||||
libcalamares.utils.debug("lightdm selected but not installed")
|
libcalamares.utils.debug("lightdm selected but not installed")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue