From 151ff469ab049af7e080f67dec276f92e50575b2 Mon Sep 17 00:00:00 2001 From: Maria Lainez <98marialainez@gmail.com> Date: Wed, 14 Feb 2024 17:05:47 +0100 Subject: [PATCH 1/2] Undo the possible symlink to longterm file before making the new one --- src/osa/paths.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osa/paths.py b/src/osa/paths.py index b84b736e..d3c70dce 100644 --- a/src/osa/paths.py +++ b/src/osa/paths.py @@ -369,4 +369,5 @@ def create_longterm_symlink(): latest_version_file = get_latest_version_file(all_longterm_files) log.info("Symlink the latest version longterm DL1 datacheck file in the common directory.") + linked_longterm_file.unlink() linked_longterm_file.symlink_to(latest_version_file) From 2ccc84e550d861bb806b2b5404d2145879dc1600 Mon Sep 17 00:00:00 2001 From: Daniel Morcuende Date: Wed, 14 Feb 2024 17:51:04 +0100 Subject: [PATCH 2/2] avoid failure in case of non-existing file --- src/osa/paths.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osa/paths.py b/src/osa/paths.py index d3c70dce..09c03776 100644 --- a/src/osa/paths.py +++ b/src/osa/paths.py @@ -369,5 +369,5 @@ def create_longterm_symlink(): latest_version_file = get_latest_version_file(all_longterm_files) log.info("Symlink the latest version longterm DL1 datacheck file in the common directory.") - linked_longterm_file.unlink() + linked_longterm_file.unlink(missing_ok=True) linked_longterm_file.symlink_to(latest_version_file)