From f2a91ed35dd110a23b087e4d42550a0f4bbf3325 Mon Sep 17 00:00:00 2001 From: CoCoSol007 Date: Sun, 7 Jan 2024 11:03:44 +0000 Subject: [PATCH] Changement du print lors de d'une erreur avec le serveur (#27) Reviewed-on: https://git.tipragot.fr/raphael/ponguito/pulls/27 Reviewed-by: Tipragot Co-authored-by: CoCoSol007 Co-committed-by: CoCoSol007 --- src/scenes/menu.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/scenes/menu.py b/src/scenes/menu.py index 6d36246..e528bca 100644 --- a/src/scenes/menu.py +++ b/src/scenes/menu.py @@ -21,8 +21,8 @@ IP = "pong.cocosol.fr" def get_scores() -> list[tuple[int, str]]: try: return rq.get(f"https://{IP}/data").json() - except: - print("Error with the serveur") + except Exception as error: + print("Error with the serveur : " + str(error)) return [] @@ -81,7 +81,6 @@ def __spawn_score(world: World): """ Ajoute le score dans le monde. """ - print(get_scores()) for i, (score, name) in enumerate(get_scores()): world.new_entity().set( TextBundle(