From b11f5b0f96b06e48fb87c820b08bef1d4fa79e14 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Tue, 30 Nov 2021 17:45:50 +0530 Subject: [PATCH] fix: Check if archived_sites directory exists before running --- bench/patches/v5/update_archived_sites.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bench/patches/v5/update_archived_sites.py b/bench/patches/v5/update_archived_sites.py index 76507daf..0690e4e8 100644 --- a/bench/patches/v5/update_archived_sites.py +++ b/bench/patches/v5/update_archived_sites.py @@ -28,6 +28,9 @@ def execute(bench_path): old_directory = Path(bench_path, "archived_sites") new_directory = Path(bench_path, "archived", "sites") + if not old_directory.exists(): + return False + if old_directory.is_symlink(): return True