From 71d37c40f9d82173934f3e7bc72722a0cd55e937 Mon Sep 17 00:00:00 2001 From: Vladyslav Hroshev Date: Mon, 25 Mar 2024 23:47:19 +0200 Subject: [PATCH] Refactor theme installation code to use subprocess.run() --- scripts/gdm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/gdm.py b/scripts/gdm.py index ea4fa3e..beab5a5 100644 --- a/scripts/gdm.py +++ b/scripts/gdm.py @@ -183,8 +183,10 @@ class GlobalTheme: # install theme print("Installing theme...") - os.system(f"sudo cp -f {self.extracted_theme}/{self.destination_file} " - f"{self.destination_folder}/{self.destination_file}") + subprocess.run(["sudo", "cp", "-f", + f"{self.extracted_theme}/{self.destination_file}", + f"{self.destination_folder}/{self.destination_file}"], + check=True) return 0