[Enhance] [Refactor] Add API about characters

- Add API endpoints about characters
- Some small changes in refactoring
This commit is contained in:
Lost-MSth
2023-03-22 22:27:21 +08:00
parent 8d856696ca
commit 1672d337ff
45 changed files with 575 additions and 375 deletions

View File

@@ -103,9 +103,9 @@ class RemoteMultiPlayer:
sock.sendall(bytes(data + "\n", "utf-8"))
try:
received = str(sock.recv(1024), "utf-8").strip()
except socket.timeout:
except socket.timeout as e:
raise Timeout(
'Timeout when waiting for data from link play server.', status=400)
'Timeout when waiting for data from link play server.', status=400) from e
# print(received)
return received