diff --git a/src/modules/networkcfg/main.py b/src/modules/networkcfg/main.py index f2970af24..6dab71fd9 100644 --- a/src/modules/networkcfg/main.py +++ b/src/modules/networkcfg/main.py @@ -98,10 +98,9 @@ def run(): return (_("Configuration Error"), _("No root mount point is given for
{!s}to use." ).format("networkcfg")) - source_nm = "/etc/NetworkManager/system-connections/" - target_nm = os.path.join( - root_mount_point, "etc/NetworkManager/system-connections/" - ) + nm_connections = "etc/NetworkManager/system-connections/" + source_nm = "/" + nm_connections + target_nm = os.path.join(root_mount_point, nm_connections) # Sanity checks. We don't want to do anything if a network # configuration already exists on the target @@ -122,8 +121,7 @@ def run(): replace_username(target_network, live_user, user) except FileNotFoundError: libcalamares.utils.debug( - "Can't copy network configuration files in " - + "{}".format(source_network) + "Can't copy network configuration files in {}".format(source_network) ) except FileExistsError: pass