From f87ac34f18c2c6a1397fcb5d45f1464e00cf3949 Mon Sep 17 00:00:00 2001 From: Tipragot Date: Wed, 10 Jan 2024 15:02:13 +0100 Subject: [PATCH 1/2] Fix lancher --- launch.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/launch.py b/launch.py index baf294c..e5621bb 100644 --- a/launch.py +++ b/launch.py @@ -18,7 +18,9 @@ except: # Récupération de la version du serveur try: - response = rq.get("https://git.tipragot.fr/raphael/ponguito/raw/branch/main/version.txt") + response = rq.get( + "https://git.tipragot.fr/raphael/ponguito/raw/branch/main/version.txt" + ) server_version = response.text except: print("Impossible de se connecter au serveur") @@ -32,7 +34,8 @@ if server_version != version: f.write(response.content) ZipFile("main.zip").extractall() os.remove("main.zip") - shutil.rmtree("game") + if os.path.isdir("game"): + shutil.rmtree("game") os.rename("ponguito", "game") os.rename("game/launch.py", __file__) -- 2.43.4 From 998a33c1ad1f32795a063bb6627afa791daac66f Mon Sep 17 00:00:00 2001 From: Tipragot Date: Wed, 10 Jan 2024 15:04:41 +0100 Subject: [PATCH 2/2] FSDDSD --- launch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/launch.py b/launch.py index e5621bb..71b7ef5 100644 --- a/launch.py +++ b/launch.py @@ -37,6 +37,7 @@ if server_version != version: if os.path.isdir("game"): shutil.rmtree("game") os.rename("ponguito", "game") + os.remove(__file__) os.rename("game/launch.py", __file__) # Lancement du jeu -- 2.43.4