From 9bcf11a2d4bd87961e74ced0468b87e4aaa31ec1 Mon Sep 17 00:00:00 2001 From: belthlemar Date: Wed, 18 Oct 2023 14:42:24 +0200 Subject: [PATCH] remove useless parenthesis --- antareslauncher/use_cases/retrieve/final_zip_extractor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/antareslauncher/use_cases/retrieve/final_zip_extractor.py b/antareslauncher/use_cases/retrieve/final_zip_extractor.py index 143b935..6c6e28b 100644 --- a/antareslauncher/use_cases/retrieve/final_zip_extractor.py +++ b/antareslauncher/use_cases/retrieve/final_zip_extractor.py @@ -45,7 +45,7 @@ def extract_final_zip(self, study: StudyDTO) -> None: # All we have to do is rename it by removing the prefix "_finished" # and the suffix "job_id" that lies before the ".zip". # If these prefix/suffix prefix change, this code needs to be adapted. - zip_path.rename((zip_path.parent / (zip_path.name[9:zip_path.name.rfind("_")] + ".zip"))) + zip_path.rename(zip_path.parent / (zip_path.name[9:zip_path.name.rfind("_")] + ".zip")) except (OSError, zipfile.BadZipFile) as exc: # If we cannot extract the final ZIP file, either because the file