]> jfr.im git - erebus.git/blobdiff - modules/sockets.py
sockets - now working
[erebus.git] / modules / sockets.py
index 0e96e0455889335d7a14dedac84a7c8866ebf95b..060057b5f182829b9a351964144443416cf3b998 100644 (file)
@@ -28,9 +28,9 @@ def gotParent(parent):
                @lib.bind(bindto, data=channel)
                class BasicServer(object):
                        def __init__(self, sock, data):
-                               # The lambda bit is needed to make this copy the value-at-definition instead of using the closure value-at-runtime
+                               # NB neither directly referencing `channel`, nor trying to pass it through a default-arg-to-a-lambda like the python docs suggest, works here.
+                               # Yay python. At least passing it via bind works.
                                self.chan = data
-                               print(repr(self.chan))
                                self.buffer = b''
                                self.sock = sock