From 805fed559c904e6074095276d93f25f215ca3d55 Mon Sep 17 00:00:00 2001 From: demmm Date: Mon, 16 Aug 2021 20:17:07 +0200 Subject: [PATCH] [networkcfg] use os.getlogin() cala running as root returns root for live_user otherwise --- src/modules/networkcfg/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/networkcfg/main.py b/src/modules/networkcfg/main.py index cc6c394fe..35bf67d63 100644 --- a/src/modules/networkcfg/main.py +++ b/src/modules/networkcfg/main.py @@ -15,7 +15,6 @@ import os import shutil -import getpass import libcalamares @@ -36,7 +35,7 @@ def run(): """ root_mount_point = libcalamares.globalstorage.value("rootMountPoint") user = libcalamares.globalstorage.value("username") - live_user = getpass.getuser() + live_user = os.getlogin() if root_mount_point is None: libcalamares.utils.warning("rootMountPoint is empty, {!s}".format(root_mount_point))