diff --git a/src/scenes/send_to_server.py b/src/scenes/send_to_server.py index 50cb51c..d829d88 100644 --- a/src/scenes/send_to_server.py +++ b/src/scenes/send_to_server.py @@ -20,7 +20,6 @@ def new_score(world: World, e: Entity): try: post = {"name": name[Text], "score": world[game.Player1Score]} - print(post) rq.post(f"https://{IP}/new_score", post) world.new_entity().set( TimedEvent( @@ -28,15 +27,15 @@ def new_score(world: World, e: Entity): lambda world, entity: world.set(CurrentScene(thanks.THANKS)), ) ) - except: - print("Error with the serveur") + except Exception as error: + print("Error with the serveur:", error) def get_scores(): try: return rq.get(f"https://{IP}/data").json() - except: - print("Error with the serveur") + except Exception as error: + print("Error with the serveur:", error) def __spawn_elements(world: World):