Python: Use znc.Socket if no socket class is specified in CreateSocket()

Thanks to Azelphur for giving this idea.
This commit is contained in:
Alexey Sokolov
2011-11-19 11:46:47 +07:00
parent 2ffcbed5bb
commit 3fd0429e1e

View File

@@ -163,7 +163,7 @@ class Module:
def _GetSubPages(self):
return self.GetSubPages()
def CreateSocket(self, socketclass, *the, **rest):
def CreateSocket(self, socketclass=Socket, *the, **rest):
socket = socketclass()
socket._csock = CreatePySocket(self._cmod, socket)
socket.Init(*the, **rest)