Browse Source

Strategická: Oprava warningů v klientovi

master
Martin Koreček 2 years ago
parent
commit
25c5d99f8d
  1. 8
      klient/client.py

8
klient/client.py

@ -73,10 +73,10 @@ def send_turn(turn: dict, round: int, args) -> bool:
elif response["status"] == "error":
logger.error(f"Turn error: {response['description']}")
elif response["status"] == "warning":
member_errors = [
f" {member}: {error}"
for member, error in response["errors"].items()
member_warns = [
f" {member['id']}: {member['description']}"
for member in response["members"]
]
logger.error("Member errors:\n" + "\n".join(member_errors))
logger.warn("Member warnings:\n" + "\n".join(member_warns))
return True

Loading…
Cancel
Save