From 682dc6ee99dd57ff81f2fe62743d91b91b58530e Mon Sep 17 00:00:00 2001 From: Leviaria <113382526+Leviaria@users.noreply.github.com> Date: Wed, 19 Jun 2024 15:55:05 +0200 Subject: [PATCH] Update updater.py --- clashroyalebuildabot/state/updater.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clashroyalebuildabot/state/updater.py b/clashroyalebuildabot/state/updater.py index 293faf3..b002cb9 100644 --- a/clashroyalebuildabot/state/updater.py +++ b/clashroyalebuildabot/state/updater.py @@ -73,9 +73,10 @@ def check_for_update(): logger.info("Replacing old version with new version...") replace_old_version(latest_commit_sha) update_local_version(latest_commit_sha) - os.remove(DOWNLOAD_PATH) + if os.path.exists(DOWNLOAD_PATH): + os.remove(DOWNLOAD_PATH) logger.info("Update successful!") else: logger.info("Update canceled.") else: - logger.info("You are already using the latest version.") \ No newline at end of file + logger.info("You are already using the latest version.")