From 748135ae1201df9b5ca032ca8ac98c486d2c28f4 Mon Sep 17 00:00:00 2001 From: Alf Gaida Date: Wed, 29 Mar 2017 16:49:03 +0200 Subject: [PATCH] Fixed pep8 whining in module networkcfg added myself to copyright --- src/modules/networkcfg/main.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/modules/networkcfg/main.py b/src/modules/networkcfg/main.py index 4ad9afe20..3a9d65318 100644 --- a/src/modules/networkcfg/main.py +++ b/src/modules/networkcfg/main.py @@ -5,6 +5,7 @@ # # Copyright 2014, Philip Müller # Copyright 2014, Teo Mrnjavac +# Copyright 2017, Alf Gaida # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,11 +27,15 @@ import libcalamares def run(): - """ Setup network configuration """ + """ + Setup network configuration + """ root_mount_point = libcalamares.globalstorage.value("rootMountPoint") source_nm = "/etc/NetworkManager/system-connections/" - target_nm = os.path.join(root_mount_point, "etc/NetworkManager/system-connections/") + target_nm = os.path.join( + root_mount_point, "etc/NetworkManager/system-connections/" + ) # Sanity checks. We don't want to do anything if a network # configuration already exists on the target @@ -49,7 +54,10 @@ def run(): try: shutil.copy(source_network, target_network) except FileNotFoundError: - libcalamares.utils.debug("Can't copy network configuration files in {}".format(source_network)) + libcalamares.utils.debug( + "Can't copy network configuration files in " + + "{}".format(source_network) + ) except FileExistsError: pass @@ -60,11 +68,15 @@ def run(): try: os.remove(target_resolv) except Exception as err: - libcalamares.utils.debug("Couldn't remove {}: {}".format(target_resolv, err)) + libcalamares.utils.debug( + "Couldn't remove {}: {}".format(target_resolv, err) + ) try: shutil.copy(source_resolv, target_resolv) except Exception as err: - libcalamares.utils.debug("Can't copy resolv.conf from {}: {}".format(source_resolv, err)) + libcalamares.utils.debug( + "Can't copy resolv.conf from {}: {}".format(source_resolv, err) + ) return None