From 3d52ad75441340b955a46671209ebd00418bc574 Mon Sep 17 00:00:00 2001 From: Jonas Braus Date: Thu, 12 Dec 2024 22:34:20 +0100 Subject: [PATCH] Update main.py --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index c38008f..5e3bf1e 100644 --- a/main.py +++ b/main.py @@ -54,7 +54,8 @@ def retrieve_file_contents(path, pPullFromS3): "content": content }) - shutil.rmtree(pulled_bucket_data) + if os.path.exists(pulled_bucket_data): + shutil.rmtree(pulled_bucket_data) return contents