From 4c7dbad755e9a6a16983990a80e230d4c50fc4ea Mon Sep 17 00:00:00 2001 From: Philip Date: Mon, 19 Jun 2017 16:12:13 +0200 Subject: [PATCH] [openrcdmcryptcfg] Fixed pep8 whining in module - see also https://github.com/calamares/calamares/pull/750 --- src/modules/openrcdmcryptcfg/main.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/modules/openrcdmcryptcfg/main.py b/src/modules/openrcdmcryptcfg/main.py index 2973ec5f1..494237c9b 100644 --- a/src/modules/openrcdmcryptcfg/main.py +++ b/src/modules/openrcdmcryptcfg/main.py @@ -27,14 +27,18 @@ def write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path): crypto_source = "" for partition in partitions: - if partition["mountPoint"] == "/home" and "luksMapperName" in partition: + if partition["mountPoint"] == "/home" + and "luksMapperName" in partition: crypto_target = partition["luksMapperName"] crypto_source = "/dev/disk/by-uuid/{!s}".format(partition["uuid"]) - - if not "luksMapperName" in partition: + + if "luksMapperName" not in partition: return None - with open(os.path.join(root_mount_point, dmcrypt_conf_path), 'a+') as dmcrypt_file: + with open(os.path.join(root_mount_point, + dmcrypt_conf_path), + 'a+' + ) as dmcrypt_file: dmcrypt_file.write("\ntarget=" + crypto_target) dmcrypt_file.write("\nsource=" + crypto_source) dmcrypt_file.write("\nkey=/crypto_keyfile.bin") @@ -46,7 +50,8 @@ def write_dmcrypt_conf(partitions, root_mount_point, dmcrypt_conf_path): def run(): """ - This module configures the OpenRC dmcrypt service for an encrypted /home partition. + This module configures the OpenRC dmcrypt service for an encrypted + /home partition. :return: """