From 78df1d242a786ac71b018df2be8e134299a585a3 Mon Sep 17 00:00:00 2001 From: tretrauit Date: Wed, 8 Nov 2023 16:22:30 +0700 Subject: [PATCH] fix(installer): wrap rename in try/except So it won't fail I guess, because we failed anyway. --- worthless/cli.py | 0 worthless/installer.py | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) mode change 100755 => 100644 worthless/cli.py diff --git a/worthless/cli.py b/worthless/cli.py old mode 100755 new mode 100644 diff --git a/worthless/installer.py b/worthless/installer.py index d0f0bd1..05ab256 100644 --- a/worthless/installer.py +++ b/worthless/installer.py @@ -397,7 +397,10 @@ class Installer: print("Failed to patch {}, reverting and let the in-game updater do the job...".format( old_file.with_suffix(old_suffix)) ) - old_file.rename(old_file.with_suffix(old_suffix)) + try: + old_file.rename(old_file.with_suffix(old_suffix)) + except Exception: + pass files.remove(patch_file) # Limit to 8 process running so it doesn't hang the PC.