Removed deprecated encoding argument in json.loads
This commit is contained in:
parent
855e7efa8a
commit
17b9161813
@ -22,7 +22,7 @@ class client(object):
|
|||||||
self.disconnected(event.peer)
|
self.disconnected(event.peer)
|
||||||
elif event.type == enet.EVENT_TYPE_RECEIVE:
|
elif event.type == enet.EVENT_TYPE_RECEIVE:
|
||||||
data = event.packet.data
|
data = event.packet.data
|
||||||
data_dict = json.loads(data, encoding="utf-8")
|
data_dict = json.loads(data)
|
||||||
self.network(event, data_dict)
|
self.network(event, data_dict)
|
||||||
time.sleep(0.001)
|
time.sleep(0.001)
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class server(object):
|
|||||||
print("Error receiving packet for invalid channel: %r" % (event.data))
|
print("Error receiving packet for invalid channel: %r" % (event.data))
|
||||||
return
|
return
|
||||||
data = event.packet.data
|
data = event.packet.data
|
||||||
data_dict = json.loads(data, encoding="utf-8")
|
data_dict = json.loads(data)
|
||||||
channel_object.network(event, data_dict)
|
channel_object.network(event, data_dict)
|
||||||
time.sleep(0.0001)
|
time.sleep(0.0001)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user