Fix for PathLib unlink wrong version parameter. (#3020)

* Fix for PathLib unlink wrong version parameter.

* Fix dst target for TIAF.

* Remove TIAF historic data arhciving on s3 buckets

* Change permissions for TIAF bucket upload

Signed-off-by: John <jonawals@amazon.com>
This commit is contained in:
jonawals
2021-08-11 02:43:44 +01:00
committed by GitHub
parent 4cee263033
commit a7a0e8d2ef
3 changed files with 7 additions and 8 deletions
@@ -32,7 +32,9 @@ class Repo:
try:
# Remove the existing file (if any) and create the parent directory
output_path.unlink(missing_ok=True)
# output_path.unlink(missing_ok=True) # missing_ok is only available in Python 3.8+
if output_path.is_file():
output_path.unlink()
output_path.parent.mkdir(exist_ok=True)
except EnvironmentError as e:
raise RuntimeError(f"Could not create path for output file '{output_path}'")