Socket on_read functions take 2 args (socket, string)

This commit is contained in:
jesopo 2018-10-07 07:56:11 +01:00
parent bb533ab9e8
commit 472d745401

View file

@ -24,7 +24,7 @@ class Bot(object):
self.servers = {}
self.other_sockets = {}
self._trigger_server, self._trigger_client = socket.socketpair()
self.add_socket(Socket.Socket(self._trigger_server, lambda x: x))
self.add_socket(Socket.Socket(self._trigger_server, lambda _, s: None))
def trigger(self):
self._trigger_client.send(b"TRIGGER")