From 7176c3a96e4e46c4d86bb1e7f8d79eac1f017e35 Mon Sep 17 00:00:00 2001 From: Phil Owen <19691521+PhillipsOwen@users.noreply.github.com> Date: Fri, 5 Apr 2024 07:32:06 -0400 Subject: [PATCH] removing dirs that were archived --- src/staging/staging.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/staging/staging.py b/src/staging/staging.py index 7196ff1..611dc11 100644 --- a/src/staging/staging.py +++ b/src/staging/staging.py @@ -285,11 +285,10 @@ def final_staging(self, run_id: str, run_dir: str, staging_type: StagingType) -> self.logger.info('glob dir: %s/**/', run_dir) # remove all directories from the run (leaving the archive file) - [self.logger.info(f'dir %s in %s/**/ deleted', data_dir, run_dir) for data_dir in glob.glob(f'{run_dir}/**/')] - # shutil.rmtree(x, ignore_errors=True) for x in glob.glob(f'{run_dir}/**/')] + [shutil.rmtree(data_dir, ignore_errors=True) for data_dir in glob.glob(f'{run_dir}/**/')] - for item in glob.glob(f'{run_dir}/**/'): - self.logger.info(f'again dir %s in %s/**/ deleted', item, run_dir) + # for item in glob.glob(f'{run_dir}/**/'): + # self.logger.info(f'dir %s in %s/**/ deleted', item, run_dir) else: ret_val = ReturnCodes.ERROR_NO_RUN_DIR