[services] PEP8 modification

This commit is contained in:
Philip 2017-06-23 11:32:41 +02:00
parent e761ae9008
commit 66c36446fa

View File

@ -100,23 +100,27 @@ def run():
"systemctl disable call in chroot returned error code "
"{}".format(ec)
)
if libcalamares.globalstorage.contains("displayManagers"):
for dm in libcalamares.globalstorage.value("displayManagers"):
if not exists(join(rootmnt, "etc/systemd/system/display-manager.service")):
if not exists(join(
rootmnt, "etc/systemd/system/display-manager.service"
)):
ec = libcalamares.utils.target_env_call(
['systemctl', 'enable', '{}.service'.format(dm)]
)
if ec != 0:
return "Cannot enable systemd service {}".format(dm), \
"systemctl enable call in chroot returned error code {}".format(ec)
"systemctl enable call in chroot returned error code"
"{}".format(ec)
else:
libcalamares.utils.debug(
"Cannot enable systemd service {}".format(dm)
)
libcalamares.utils.debug(
"systemctl enable call in chroot returned error code {}".format(ec)
"systemctl enable call in chroot returned error code"
"{}".format(ec)
)
return None