[IMP] better python2.5/2.6 compatibility handling

bzr revid: olt@tinyerp.com-20091027083221-37mv4k6lei43xfla
This commit is contained in:
olt@tinyerp.com
2009-10-27 09:32:21 +01:00
parent 7c26523b0a
commit 58fe9c62e6
+1 -4
View File
@@ -1412,10 +1412,7 @@ class FTPHandler(asynchat.async_chat):
established connection.
- (instance) server: the ftp server class instance.
"""
try:
asynchat.async_chat.__init__(self, conn=conn) # python2.5
except TypeError, e:
asynchat.async_chat.__init__(self, sock=conn) # python2.6
asynchat.async_chat.__init__(self, conn)
self.server = server
self.remote_ip, self.remote_port = self.socket.getpeername()[:2]
self.in_buffer = []