From f80ab2ba3024e582201d67904fd0a2c9f431b386 Mon Sep 17 00:00:00 2001
From: Neves-P
Date: Tue, 2 Jul 2024 13:30:33 +0200
Subject: [PATCH] Use rmtree
---
tasks/clean_up.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tasks/clean_up.py b/tasks/clean_up.py
index 8e2e509..bc78077 100644
--- a/tasks/clean_up.py
+++ b/tasks/clean_up.py
@@ -45,7 +45,7 @@ def move_to_trash_bin(trash_bin_dir, job_dirs):
for pr_dir in pr_dirs:
destination_dir = shutil.copytree(pr_dir, trash_bin_dir)
log(f"{funcname}(): copied {pr_dir} to {destination_dir}")
- os.remove(pr_dir)
+ shutil.rmtree(pr_dir) # Use shutil.rmtree to remove directories recursively
log(f"{funcname}(): removed {pr_dir}")
return True