From 30c39acabe43de97a7fbe4a72cc6d0bcb933473c Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Mon, 18 Oct 2021 12:07:42 +0530 Subject: [PATCH] fix: Don't unlink file blindly This made sense with the missing_ok. But now, a try-except seems unnecessary too. Also, possibly destructive. Best to stray away from these things. --- frappe/installer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/frappe/installer.py b/frappe/installer.py index 70dbbb61e8..d1a13fdaab 100755 --- a/frappe/installer.py +++ b/frappe/installer.py @@ -507,7 +507,6 @@ def convert_archive_content(sql_file_path): sql_file_path = Path(sql_file_path) os.rename(sql_file_path, old_sql_file_path) - sql_file_path.unlink() sql_file_path.touch() with open(old_sql_file_path) as r, open(sql_file_path, "a") as w: