From 09f11a40915abbb435cf2e6d1d2e77f988211e7b Mon Sep 17 00:00:00 2001 From: Philip Date: Fri, 23 Jun 2017 11:59:45 +0200 Subject: [PATCH] [PEP8] fix several modules --- src/modules/mhwdcfg/main.py | 5 ++++- src/modules/postcfg/main.py | 3 ++- src/modules/services/main.py | 8 ++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/modules/mhwdcfg/main.py b/src/modules/mhwdcfg/main.py index eb373387a..7ae532dd1 100644 --- a/src/modules/mhwdcfg/main.py +++ b/src/modules/mhwdcfg/main.py @@ -30,7 +30,10 @@ class MhwdController: def __init__(self): self.__root = libcalamares.globalstorage.value("rootMountPoint") self.__bus = libcalamares.job.configuration.get('bus', []) - self.__identifier = libcalamares.job.configuration.get('identifier', []) + self.__identifier = libcalamares.job.configuration.get( + 'identifier', + [] + ) self.__local = libcalamares.job.configuration['local'] self.__repo = libcalamares.job.configuration['repo'] self._driver = libcalamares.job.configuration['driver'] diff --git a/src/modules/postcfg/main.py b/src/modules/postcfg/main.py index f8ce1cad3..4659ac545 100644 --- a/src/modules/postcfg/main.py +++ b/src/modules/postcfg/main.py @@ -86,7 +86,8 @@ class ConfigController: self.terminate('gpg-agent') # Update grub.cfg - if exists(join(self.root, "usr/bin/update-grub")) and libcalamares.globalstorage.value("bootLoader") is not None: + if exists(join(self.root, "usr/bin/update-grub")) \ + and libcalamares.globalstorage.value("bootLoader") is not None: target_env_call(["update-grub"]) return None diff --git a/src/modules/services/main.py b/src/modules/services/main.py index b6616392d..b9f2dc0e0 100644 --- a/src/modules/services/main.py +++ b/src/modules/services/main.py @@ -69,7 +69,7 @@ def run(): if ec != 0: if tgt['mandatory']: return ("Cannot enable systemd target {}".format(tgt['name']), - "systemctl enable call in chroot returned error code" + "systemctl enable call in chroot returned error code " "{}".format(ec) ) else: @@ -90,7 +90,7 @@ def run(): if dbl['mandatory']: return ("Cannot disable systemd service" "{}".format(dbl['name']), - "systemctl disable call in chroot returned error code" + "systemctl disable call in chroot returned error code " "{}".format(ec)) else: libcalamares.utils.debug( @@ -112,14 +112,14 @@ def run(): if ec != 0: return "Cannot enable systemd service {}".format(dm), \ - "systemctl enable call in chroot returned error code" + "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" + "systemctl enable call in chroot returned error code " "{}".format(ec) )