Changement du print lors de d'une erreur avec le serveur #27
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue