Skip to content

Commit

Permalink
removing dirs that were archived
Browse files Browse the repository at this point in the history
  • Loading branch information
PhillipsOwen committed Apr 5, 2024
1 parent aae2ccc commit 7176c3a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/staging/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7176c3a

Please sign in to comment.