Aaron
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
2 deletions
-
socketio/asyncio_server.py
-
socketio/server.py
|
|
@ -362,8 +362,10 @@ class AsyncServer(server.Server): |
|
|
|
# as a single argument |
|
|
|
if isinstance(data, tuple): |
|
|
|
data = list(data) |
|
|
|
else: |
|
|
|
elif data is not None: |
|
|
|
data = [data] |
|
|
|
else: |
|
|
|
data = [] |
|
|
|
await self._send_packet(sid, packet.Packet( |
|
|
|
packet.EVENT, namespace=namespace, data=[event] + data, id=id, |
|
|
|
binary=None)) |
|
|
|
|
|
@ -573,8 +573,10 @@ class Server(object): |
|
|
|
# as a single argument |
|
|
|
if isinstance(data, tuple): |
|
|
|
data = list(data) |
|
|
|
else: |
|
|
|
elif data is not None: |
|
|
|
data = [data] |
|
|
|
else: |
|
|
|
data = [] |
|
|
|
self._send_packet(sid, packet.Packet(packet.EVENT, namespace=namespace, |
|
|
|
data=[event] + data, id=id, |
|
|
|
binary=binary)) |
|
|
|