From 4d20284f850de4853ed44a3fca15e7b8b0f94deb Mon Sep 17 00:00:00 2001 From: rick-masters Date: Mon, 27 Nov 2023 13:55:05 +0000 Subject: [PATCH] Return process from run_as_root. --- lib/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils.py b/lib/utils.py index 8cce35f..155ddb7 100755 --- a/lib/utils.py +++ b/lib/utils.py @@ -28,9 +28,9 @@ def run(*args, **kwargs): def run_as_root(*args, **kwargs): """A helper for run that invokes sudo when unprivileged""" if os.geteuid() != 0: - run("sudo", *args, **kwargs) + return run("sudo", *args, **kwargs) else: - run(*args, **kwargs) + return run(*args, **kwargs) def create_disk(image, disk_type, fs_type, size): """Create a disk image, with a filesystem on it"""