how about replace the two initial lines,
sockets = map(...)
sockets = filter(...)
with:
sockets = [conn.get_socket() for conn in self.connections if conn.get_socket() != None].
dccreceive example line 29 (version 0.4.8) should be:
self.file = open(self.filename, 'w+b')
instead of
self.file = open(self.filename, 'w')
This won't work correctly on Windows since Windows does string encoding (i.e., change '\n' to '\r\n'). The fix is to open the file for writing in binary mode instead of text mode.