Commit 7c3c5087 authored by Hanno Schlichting's avatar Hanno Schlichting

Removed fallback code for old Python versions from `ZServer.FTPServer.zope_ftp_channel.push`.

parent 75877c02
......@@ -22,6 +22,9 @@ Bugs Fixed
Restructuring
+++++++++++++
- Removed fallback code for old Python versions from
`ZServer.FTPServer.zope_ftp_channel.push`.
- Removed fallback code for old `ZCatalog.catalog_object` function signatures
from `Products.ZCatalog.ZCatalog.reindexIndex`.
......
......@@ -64,7 +64,6 @@ FTP Authorization
"""
import sys
from PubCore import handle
from medusa.ftp_server import ftp_channel, ftp_server, recv_channel
import asyncore, asynchat
......@@ -82,8 +81,6 @@ import marshal
import stat
import time
py26_or_later = sys.version_info >= (2,6)
class zope_ftp_channel(ftp_channel):
"Passes its commands to Zope, not a filesystem"
......@@ -113,18 +110,13 @@ class zope_ftp_channel(ftp_channel):
# note, that strings are not wrapped in
# producers by default
# LP #418454
if py26_or_later:
# Python 2.6 or later
sabs = self.ac_out_buffer_size
if len(data) > sabs:
for i in xrange(0, len(data), sabs):
self.producer_fifo.append(data[i:i+sabs])
else:
self.producer_fifo.append(data)
# LP #418454, Python 2.6 or later
sabs = self.ac_out_buffer_size
if len(data) > sabs:
for i in xrange(0, len(data), sabs):
self.producer_fifo.append(data[i:i+sabs])
else:
# pre-Python 2.6
self.producer_fifo.push(data)
self.producer_fifo.append(data)
if send:
self.initiate_send()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment