Replace scandir with listdir, simplify loop
FIXES: ??
This commit is contained in:
parent
1e00813341
commit
decf83d403
@ -484,12 +484,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)
|
||||||
@ -504,9 +501,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…
Reference in New Issue
Block a user