[FIX] python2.6 compatibility

bzr revid: olt@tinyerp.com-20091022100647-1hqb0w9gm0awokh2
This commit is contained in:
olt@tinyerp.com
2009-10-22 12:06:47 +02:00
parent 28bd548716
commit 87fe5ef53f
+4 -1
View File
@@ -1412,7 +1412,10 @@ class FTPHandler(asynchat.async_chat):
established connection.
- (instance) server: the ftp server class instance.
"""
asynchat.async_chat.__init__(self, conn=conn)
try:
asynchat.async_chat.__init__(self, conn=conn) # python2.5
except TypeError, e:
asynchat.async_chat.__init__(self, sock=conn) # python2.6
self.server = server
self.remote_ip, self.remote_port = self.socket.getpeername()[:2]
self.in_buffer = []