Suppression du print unutile et meilleur print des erreurs d'envoit
This commit is contained in:
parent
ea70c297b2
commit
c497c4342c
|
@ -20,7 +20,6 @@ def new_score(world: World, e: Entity):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
post = {"name": name[Text], "score": world[game.Player1Score]}
|
post = {"name": name[Text], "score": world[game.Player1Score]}
|
||||||
print(post)
|
|
||||||
rq.post(f"https://{IP}/new_score", post)
|
rq.post(f"https://{IP}/new_score", post)
|
||||||
world.new_entity().set(
|
world.new_entity().set(
|
||||||
TimedEvent(
|
TimedEvent(
|
||||||
|
@ -28,15 +27,15 @@ def new_score(world: World, e: Entity):
|
||||||
lambda world, entity: world.set(CurrentScene(thanks.THANKS)),
|
lambda world, entity: world.set(CurrentScene(thanks.THANKS)),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
except:
|
except Exception as error:
|
||||||
print("Error with the serveur")
|
print("Error with the serveur:", error)
|
||||||
|
|
||||||
|
|
||||||
def get_scores():
|
def get_scores():
|
||||||
try:
|
try:
|
||||||
return rq.get(f"https://{IP}/data").json()
|
return rq.get(f"https://{IP}/data").json()
|
||||||
except:
|
except Exception as error:
|
||||||
print("Error with the serveur")
|
print("Error with the serveur:", error)
|
||||||
|
|
||||||
|
|
||||||
def __spawn_elements(world: World):
|
def __spawn_elements(world: World):
|
||||||
|
|
Loading…
Reference in a new issue