From 3d8ba0f5e8f142a573d50571dfaa1fb26952c44b Mon Sep 17 00:00:00 2001 From: oloturia <5429234+oloturia@users.noreply.github.com> Date: Wed, 3 Nov 2021 13:17:44 +0100 Subject: [PATCH] fixed a bug that happens if the game crashes again --- damastodon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/damastodon.py b/damastodon.py index ea96be6..351bcea 100755 --- a/damastodon.py +++ b/damastodon.py @@ -105,7 +105,8 @@ def check_message(notification): try: start = pickle.load(f) except EOFError: # Something went very wrong, file is corrupt? - mastodon.status_post("Hello @"+account+" \n unfortunately, your savegame is corrupted or missing",visibility="direct") #The file has moved or corrupted + mastodon.status_post("Hello @"+account+" \n unfortunately, your savegame is corrupted or missing",visibility="direct") #The file has been moved or is corrupted + os.remove(save_position+account) print(account+" file corrupted") return if start: #The game is started, load other parameters